const char *regexp_msg = N_("Regexp");
#endif
#ifndef NANO_TINY
+ const char *prev_history_msg = N_("PrevHstory");
/* TRANSLATORS: Try to keep this and previous strings at most 10 characters. */
- const char *history_msg = N_("History");
+ const char *next_history_msg = N_("NextHstory");
#ifdef ENABLE_MULTIBUFFER
/* TRANSLATORS: Try to keep this at most 16 characters. */
const char *new_buffer_msg = N_("New Buffer");
const char *nano_regexp_msg = N_("Use regular expressions");
#endif
#ifndef NANO_TINY
- const char *nano_history_msg =
- N_("Edit the previous search/replace strings");
+ const char *nano_prev_history_msg =
+ N_("Edit the previous search/replace string");
+ const char *nano_next_history_msg =
+ N_("Edit the next search/replace string");
#endif
#ifndef DISABLE_BROWSER
const char *nano_tofiles_msg = N_("Go to file browser");
#endif
#ifndef NANO_TINY
- sc_init_one(&whereis_list, NANO_PREVLINE_KEY, history_msg,
- IFHELP(nano_history_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
+ sc_init_one(&whereis_list, NANO_PREVLINE_KEY, prev_history_msg,
+ IFHELP(nano_prev_history_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
+ NANO_NO_KEY, VIEW, NULL);
+
+ sc_init_one(&whereis_list, NANO_NEXTLINE_KEY, next_history_msg,
+ IFHELP(nano_next_history_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
NANO_NO_KEY, VIEW, NULL);
sc_init_one(&whereis_list, NANO_CUTTILLEND_KEY, cut_till_end_msg,
IFHELP(nano_lastline_msg, FALSE), NANO_LASTLINE_ALTKEY,
NANO_LASTLINE_FKEY, NANO_LASTLINE_ALTKEY2, VIEW, do_last_line);
- /* TRANSLATORS: Try to keep this at most 12 characters. */
+ /* TRANSLATORS: Try to keep this at most 10 characters. */
sc_init_one(&replace_list, NANO_TOOTHERSEARCH_KEY, N_("No Replace"),
IFHELP(nano_whereis_msg, FALSE), NANO_NO_KEY, NANO_REPLACE_FKEY,
NANO_NO_KEY, VIEW, NULL);
#endif
#ifndef NANO_TINY
- sc_init_one(&replace_list, NANO_PREVLINE_KEY, history_msg,
- IFHELP(nano_history_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
+ sc_init_one(&replace_list, NANO_PREVLINE_KEY, prev_history_msg,
+ IFHELP(nano_prev_history_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
+ NANO_NO_KEY, VIEW, NULL);
+
+ sc_init_one(&replace_list, NANO_NEXTLINE_KEY, next_history_msg,
+ IFHELP(nano_next_history_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
NANO_NO_KEY, VIEW, NULL);
#endif
NANO_LASTLINE_FKEY, NANO_LASTLINE_ALTKEY2, VIEW, do_last_line);
#ifndef NANO_TINY
- sc_init_one(&replace_list_2, NANO_PREVLINE_KEY, history_msg,
- IFHELP(nano_history_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
+ sc_init_one(&replace_list_2, NANO_PREVLINE_KEY, prev_history_msg,
+ IFHELP(nano_prev_history_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
+ NANO_NO_KEY, VIEW, NULL);
+
+ sc_init_one(&replace_list_2, NANO_NEXTLINE_KEY, next_history_msg,
+ IFHELP(nano_next_history_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
NANO_NO_KEY, VIEW, NULL);
#endif
#endif
#ifndef NANO_SMALL
- sc_init_one(&whereis_file_list, NANO_PREVLINE_KEY, history_msg,
- IFHELP(nano_history_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
+ sc_init_one(&whereis_file_list, NANO_PREVLINE_KEY, prev_history_msg,
+ IFHELP(nano_prev_history_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
+ NANO_NO_KEY, VIEW, NULL);
+
+ sc_init_one(&whereis_file_list, NANO_NEXTLINE_KEY, next_history_msg,
+ IFHELP(nano_next_history_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
NANO_NO_KEY, VIEW, NULL);
#endif
/* If we got a shortcut from the current list, or a "universal"
* statusbar prompt shortcut, set have_shortcut to TRUE. */
- have_shortcut = (s != NULL || input == NANO_REFRESH_KEY || input ==
- NANO_HOME_KEY || input == NANO_END_KEY || input ==
- NANO_BACK_KEY || input == NANO_FORWARD_KEY || input ==
- NANO_BACKSPACE_KEY || input == NANO_DELETE_KEY || input ==
- NANO_CUT_KEY ||
+ have_shortcut = (s != NULL || input == NANO_ENTER_KEY || input ==
+ NANO_REFRESH_KEY || input == NANO_HOME_KEY || input ==
+ NANO_END_KEY || input == NANO_BACK_KEY || input ==
+ NANO_FORWARD_KEY || input == NANO_BACKSPACE_KEY || input ==
+ NANO_DELETE_KEY || input == NANO_CUT_KEY ||
#ifndef NANO_TINY
input == NANO_NEXTWORD_KEY ||
#endif
*s_or_t = have_shortcut;
/* If we got a non-high-bit control key or a meta key sequence, and
- * it's not a shortcut or toggle, ignore it. If it's a meta key
- * sequence, throw it out completely, so that we don't end up
- * inserting its second character as though it were typed. */
+ * it's not a shortcut or toggle, throw it out. */
if (*s_or_t == FALSE) {
if (is_ascii_cntrl_char(input) || *meta_key == TRUE) {
- if (*meta_key == TRUE) {
+ if (*meta_key == TRUE)
*meta_key = FALSE;
- input = ERR;
- }
+ input = ERR;
}
}
if (have_shortcut) {
switch (input) {
/* Handle the "universal" statusbar prompt shortcuts. */
+ case NANO_ENTER_KEY:
+ break;
case NANO_REFRESH_KEY:
total_statusbar_refresh(refresh_func);
break;
}
update_statusbar_line(answer, statusbar_x);
+
+ /* This key has a shortcut list entry when it's used
+ * to move to an older search, which means that
+ * finished has been set to TRUE. Set it back to
+ * FALSE here, so that we aren't kicked out of the
+ * statusbar prompt. */
+ finished = FALSE;
}
break;
#endif /* !NANO_TINY */