if (have_shortcut) {
switch (input) {
/* 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:
/* If we're using restricted mode, the filename
* isn't blank, and we're at the "Write File"
'\0' || currshortcut != writefile_list)
do_statusbar_cut_text();
break;
+ case NANO_FORWARD_KEY:
+ do_statusbar_right();
+ break;
+ case NANO_BACK_KEY:
+ do_statusbar_left();
+ break;
#ifndef NANO_TINY
case NANO_NEXTWORD_KEY:
do_statusbar_next_word(FALSE);
if (*meta_key == TRUE)
do_statusbar_prev_word(FALSE);
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
case NANO_VERBATIM_KEY:
if (*meta_key == TRUE) {
}
}
break;
-#ifndef NANO_TINY
- case NANO_BRACKET_KEY:
- if (*meta_key == TRUE)
- do_statusbar_find_bracket();
+ 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_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;
-#endif
/* Handle the normal statusbar prompt shortcuts, setting
* ran_func to TRUE if we try to run their associated
* functions and setting finished to TRUE to indicate