cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3430 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
c87e0c0965
commit
fcff1e7401
72
src/prompt.c
72
src/prompt.c
|
@ -154,37 +154,6 @@ int do_statusbar_input(bool *meta_key, bool *func_key, bool *s_or_t,
|
||||||
if (have_shortcut) {
|
if (have_shortcut) {
|
||||||
switch (input) {
|
switch (input) {
|
||||||
/* Handle the "universal" statusbar prompt shortcuts. */
|
/* Handle the "universal" statusbar prompt shortcuts. */
|
||||||
case NANO_REFRESH_KEY:
|
|
||||||
refresh_func();
|
|
||||||
break;
|
|
||||||
case NANO_HOME_KEY:
|
|
||||||
do_statusbar_home();
|
|
||||||
break;
|
|
||||||
case NANO_END_KEY:
|
|
||||||
do_statusbar_end();
|
|
||||||
break;
|
|
||||||
case NANO_BACK_KEY:
|
|
||||||
do_statusbar_left();
|
|
||||||
break;
|
|
||||||
case NANO_FORWARD_KEY:
|
|
||||||
do_statusbar_right();
|
|
||||||
break;
|
|
||||||
case NANO_BACKSPACE_KEY:
|
|
||||||
/* If we're using restricted mode, the filename
|
|
||||||
* isn't blank, and we're at the "Write File"
|
|
||||||
* prompt, disable Backspace. */
|
|
||||||
if (!ISSET(RESTRICTED) || openfile->filename[0] ==
|
|
||||||
'\0' || currshortcut != writefile_list)
|
|
||||||
do_statusbar_backspace();
|
|
||||||
break;
|
|
||||||
case NANO_DELETE_KEY:
|
|
||||||
/* If we're using restricted mode, the filename
|
|
||||||
* isn't blank, and we're at the "Write File"
|
|
||||||
* prompt, disable Delete. */
|
|
||||||
if (!ISSET(RESTRICTED) || openfile->filename[0] ==
|
|
||||||
'\0' || currshortcut != writefile_list)
|
|
||||||
do_statusbar_delete();
|
|
||||||
break;
|
|
||||||
case NANO_CUT_KEY:
|
case NANO_CUT_KEY:
|
||||||
/* If we're using restricted mode, the filename
|
/* If we're using restricted mode, the filename
|
||||||
* isn't blank, and we're at the "Write File"
|
* isn't blank, and we're at the "Write File"
|
||||||
|
@ -193,6 +162,12 @@ int do_statusbar_input(bool *meta_key, bool *func_key, bool *s_or_t,
|
||||||
'\0' || currshortcut != writefile_list)
|
'\0' || currshortcut != writefile_list)
|
||||||
do_statusbar_cut_text();
|
do_statusbar_cut_text();
|
||||||
break;
|
break;
|
||||||
|
case NANO_FORWARD_KEY:
|
||||||
|
do_statusbar_right();
|
||||||
|
break;
|
||||||
|
case NANO_BACK_KEY:
|
||||||
|
do_statusbar_left();
|
||||||
|
break;
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
case NANO_NEXTWORD_KEY:
|
case NANO_NEXTWORD_KEY:
|
||||||
do_statusbar_next_word(FALSE);
|
do_statusbar_next_word(FALSE);
|
||||||
|
@ -201,6 +176,18 @@ int do_statusbar_input(bool *meta_key, bool *func_key, bool *s_or_t,
|
||||||
if (*meta_key == TRUE)
|
if (*meta_key == TRUE)
|
||||||
do_statusbar_prev_word(FALSE);
|
do_statusbar_prev_word(FALSE);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
case NANO_HOME_KEY:
|
||||||
|
do_statusbar_home();
|
||||||
|
break;
|
||||||
|
case NANO_END_KEY:
|
||||||
|
do_statusbar_end();
|
||||||
|
break;
|
||||||
|
#ifndef NANO_TINY
|
||||||
|
case NANO_BRACKET_KEY:
|
||||||
|
if (*meta_key == TRUE)
|
||||||
|
do_statusbar_find_bracket();
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
case NANO_VERBATIM_KEY:
|
case NANO_VERBATIM_KEY:
|
||||||
if (*meta_key == TRUE) {
|
if (*meta_key == TRUE) {
|
||||||
|
@ -225,12 +212,25 @@ int do_statusbar_input(bool *meta_key, bool *func_key, bool *s_or_t,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#ifndef NANO_TINY
|
case NANO_DELETE_KEY:
|
||||||
case NANO_BRACKET_KEY:
|
/* If we're using restricted mode, the filename
|
||||||
if (*meta_key == TRUE)
|
* isn't blank, and we're at the "Write File"
|
||||||
do_statusbar_find_bracket();
|
* prompt, disable Delete. */
|
||||||
|
if (!ISSET(RESTRICTED) || openfile->filename[0] ==
|
||||||
|
'\0' || currshortcut != writefile_list)
|
||||||
|
do_statusbar_delete();
|
||||||
|
break;
|
||||||
|
case NANO_BACKSPACE_KEY:
|
||||||
|
/* If we're using restricted mode, the filename
|
||||||
|
* isn't blank, and we're at the "Write File"
|
||||||
|
* prompt, disable Backspace. */
|
||||||
|
if (!ISSET(RESTRICTED) || openfile->filename[0] ==
|
||||||
|
'\0' || currshortcut != writefile_list)
|
||||||
|
do_statusbar_backspace();
|
||||||
|
break;
|
||||||
|
case NANO_REFRESH_KEY:
|
||||||
|
refresh_func();
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
/* Handle the normal statusbar prompt shortcuts, setting
|
/* Handle the normal statusbar prompt shortcuts, setting
|
||||||
* ran_func to TRUE if we try to run their associated
|
* ran_func to TRUE if we try to run their associated
|
||||||
* functions and setting finished to TRUE to indicate
|
* functions and setting finished to TRUE to indicate
|
||||||
|
|
Loading…
Reference in New Issue