help: in the tiny version, show Prev/Next Word before Backward/Forward
In the tiny version (built with Slang and running on Debian's bterm) the Ctrl+Left/Ctrl+Right keystrokes do not work. When the terminal is wide enough, instead of showing ^B + ^F for Backward and Forward (which are unneeded because the unmodified arrow keys work fine), show M-B + M-N for Prev Word and Next Word. (Listing ^Space and M-Space instead would cause "Prev Word" and "Next Word" to be truncated. They are weird keystrokes anyway.) Also, list M-Q + M-W for "Previous" and "Next" next to "Where Is" and "Replace", so that it is slightly clearer what they refer to.master
parent
3940032cd3
commit
3e9c2ecc85
46
src/global.c
46
src/global.c
|
@ -777,6 +777,16 @@ void shortcut_init(void)
|
||||||
add_to_funcs(do_replace, MMAIN,
|
add_to_funcs(do_replace, MMAIN,
|
||||||
N_("Replace"), WITHORSANS(replace_gist), TOGETHER, NOVIEW);
|
N_("Replace"), WITHORSANS(replace_gist), TOGETHER, NOVIEW);
|
||||||
|
|
||||||
|
#ifdef NANO_TINY
|
||||||
|
add_to_funcs(do_search_backward, MHELP,
|
||||||
|
N_("Where Was"), WITHORSANS(wherewas_gist), TOGETHER, VIEW);
|
||||||
|
|
||||||
|
add_to_funcs(do_findprevious, MMAIN|MHELP,
|
||||||
|
N_("Previous"), WITHORSANS(findprev_gist), TOGETHER, VIEW);
|
||||||
|
add_to_funcs(do_findnext, MMAIN|MHELP,
|
||||||
|
N_("Next"), WITHORSANS(findnext_gist), BLANKAFTER, VIEW);
|
||||||
|
#endif
|
||||||
|
|
||||||
add_to_funcs(cut_text, MMAIN,
|
add_to_funcs(cut_text, MMAIN,
|
||||||
N_("Cut"), WITHORSANS(cut_gist), TOGETHER, NOVIEW);
|
N_("Cut"), WITHORSANS(cut_gist), TOGETHER, NOVIEW);
|
||||||
|
|
||||||
|
@ -851,25 +861,32 @@ void shortcut_init(void)
|
||||||
N_("Where Is"), WITHORSANS(browserwhereis_gist), TOGETHER, VIEW);
|
N_("Where Is"), WITHORSANS(browserwhereis_gist), TOGETHER, VIEW);
|
||||||
add_to_funcs(do_search_backward, MBROWSER,
|
add_to_funcs(do_search_backward, MBROWSER,
|
||||||
N_("Where Was"), WITHORSANS(browserwherewas_gist), TOGETHER, VIEW);
|
N_("Where Was"), WITHORSANS(browserwherewas_gist), TOGETHER, VIEW);
|
||||||
|
|
||||||
|
add_to_funcs(do_findprevious, MBROWSER,
|
||||||
|
N_("Previous"), WITHORSANS(findprev_gist), TOGETHER, VIEW);
|
||||||
|
add_to_funcs(do_findnext, MBROWSER,
|
||||||
|
N_("Next"), WITHORSANS(findnext_gist), BLANKAFTER, VIEW);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
#ifdef NANO_TINY
|
||||||
|
add_to_funcs(to_prev_word, MMAIN,
|
||||||
|
"Prev Word", WITHORSANS(prevword_gist), TOGETHER, VIEW);
|
||||||
|
add_to_funcs(to_next_word, MMAIN,
|
||||||
|
"Next Word", WITHORSANS(nextword_gist), BLANKAFTER, VIEW);
|
||||||
|
#else
|
||||||
add_to_funcs(do_find_bracket, MMAIN,
|
add_to_funcs(do_find_bracket, MMAIN,
|
||||||
N_("To Bracket"), WITHORSANS(bracket_gist), BLANKAFTER, VIEW);
|
N_("To Bracket"), WITHORSANS(bracket_gist), BLANKAFTER, VIEW);
|
||||||
|
|
||||||
add_to_funcs(do_search_backward, MMAIN|MHELP,
|
add_to_funcs(do_search_backward, MMAIN|MHELP,
|
||||||
/* TRANSLATORS: This starts a backward search. */
|
/* TRANSLATORS: This starts a backward search. */
|
||||||
N_("Where Was"), WITHORSANS(wherewas_gist), TOGETHER, VIEW);
|
N_("Where Was"), WITHORSANS(wherewas_gist), TOGETHER, VIEW);
|
||||||
#else
|
|
||||||
add_to_funcs(do_search_backward, MHELP,
|
|
||||||
N_("Where Was"), WITHORSANS(wherewas_gist), TOGETHER, VIEW);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
add_to_funcs(do_findprevious, MMAIN|MBROWSER|MHELP,
|
add_to_funcs(do_findprevious, MMAIN|MHELP,
|
||||||
/* TRANSLATORS: This refers to searching the preceding occurrence. */
|
/* TRANSLATORS: This refers to searching the preceding occurrence. */
|
||||||
N_("Previous"), WITHORSANS(findprev_gist), TOGETHER, VIEW);
|
N_("Previous"), WITHORSANS(findprev_gist), TOGETHER, VIEW);
|
||||||
add_to_funcs(do_findnext, MMAIN|MBROWSER|MHELP,
|
add_to_funcs(do_findnext, MMAIN|MHELP,
|
||||||
N_("Next"), WITHORSANS(findnext_gist), BLANKAFTER, VIEW);
|
N_("Next"), WITHORSANS(findnext_gist), BLANKAFTER, VIEW);
|
||||||
|
#endif
|
||||||
|
|
||||||
add_to_funcs(do_left, MMAIN,
|
add_to_funcs(do_left, MMAIN,
|
||||||
/* TRANSLATORS: This means move the cursor one character back. */
|
/* TRANSLATORS: This means move the cursor one character back. */
|
||||||
|
@ -883,11 +900,13 @@ void shortcut_init(void)
|
||||||
N_("Forward"), WITHORSANS(forwardfile_gist), TOGETHER, VIEW);
|
N_("Forward"), WITHORSANS(forwardfile_gist), TOGETHER, VIEW);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef NANO_TINY
|
||||||
add_to_funcs(to_prev_word, MMAIN,
|
add_to_funcs(to_prev_word, MMAIN,
|
||||||
/* TRANSLATORS: Try to keep the next ten strings at most 12 characters. */
|
/* TRANSLATORS: Try to keep the next ten strings at most 12 characters. */
|
||||||
N_("Prev Word"), WITHORSANS(prevword_gist), TOGETHER, VIEW);
|
N_("Prev Word"), WITHORSANS(prevword_gist), TOGETHER, VIEW);
|
||||||
add_to_funcs(to_next_word, MMAIN,
|
add_to_funcs(to_next_word, MMAIN,
|
||||||
N_("Next Word"), WITHORSANS(nextword_gist), TOGETHER, VIEW);
|
N_("Next Word"), WITHORSANS(nextword_gist), TOGETHER, VIEW);
|
||||||
|
#endif
|
||||||
|
|
||||||
add_to_funcs(do_home, MMAIN,
|
add_to_funcs(do_home, MMAIN,
|
||||||
N_("Home"), WITHORSANS(home_gist), TOGETHER, VIEW);
|
N_("Home"), WITHORSANS(home_gist), TOGETHER, VIEW);
|
||||||
|
@ -1206,7 +1225,12 @@ void shortcut_init(void)
|
||||||
add_to_sclist(MMAIN|MHELP, "^End", CONTROL_END, to_last_line, 0);
|
add_to_sclist(MMAIN|MHELP, "^End", CONTROL_END, to_last_line, 0);
|
||||||
add_to_sclist(MMAIN|MBROWSER|MHELP, "M-W", 0, do_findnext, 0);
|
add_to_sclist(MMAIN|MBROWSER|MHELP, "M-W", 0, do_findnext, 0);
|
||||||
add_to_sclist(MMAIN|MBROWSER|MHELP, "M-Q", 0, do_findprevious, 0);
|
add_to_sclist(MMAIN|MBROWSER|MHELP, "M-Q", 0, do_findprevious, 0);
|
||||||
#ifndef NANO_TINY
|
#ifdef NANO_TINY
|
||||||
|
add_to_sclist(MMAIN, "M-B", 0, to_prev_word, 0);
|
||||||
|
add_to_sclist(MMAIN, "M-D", 0, to_prev_word, 0);
|
||||||
|
add_to_sclist(MMAIN, "M-N", 0, to_next_word, 0);
|
||||||
|
add_to_sclist(MMAIN, "M-F", 0, to_next_word, 0);
|
||||||
|
#else
|
||||||
add_to_sclist(MMAIN, "M-]", 0, do_find_bracket, 0);
|
add_to_sclist(MMAIN, "M-]", 0, do_find_bracket, 0);
|
||||||
add_to_sclist(MMAIN, "M-A", 0, do_mark, 0);
|
add_to_sclist(MMAIN, "M-A", 0, do_mark, 0);
|
||||||
add_to_sclist(MMAIN, "^6", 0, do_mark, 0);
|
add_to_sclist(MMAIN, "^6", 0, do_mark, 0);
|
||||||
|
@ -1263,12 +1287,6 @@ void shortcut_init(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef NANO_TINY
|
|
||||||
add_to_sclist(MMAIN, "M-B", 0, to_prev_word, 0);
|
|
||||||
add_to_sclist(MMAIN, "M-D", 0, to_prev_word, 0);
|
|
||||||
add_to_sclist(MMAIN, "M-F", 0, to_next_word, 0);
|
|
||||||
add_to_sclist(MMAIN, "M-N", 0, to_next_word, 0);
|
|
||||||
#endif
|
|
||||||
add_to_sclist(MMOST, "M-Space", 0, to_prev_word, 0);
|
add_to_sclist(MMOST, "M-Space", 0, to_prev_word, 0);
|
||||||
add_to_sclist(MMOST, "^Space", 0, to_next_word, 0);
|
add_to_sclist(MMOST, "^Space", 0, to_next_word, 0);
|
||||||
add_to_sclist(MMOST, "^A", 0, do_home, 0);
|
add_to_sclist(MMOST, "^A", 0, do_home, 0);
|
||||||
|
|
Loading…
Reference in New Issue