mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-23 05:11:35 +03:00
display: show the cursor also in a help text (when --showcursor is used)
The cursor can function as a reading aid for people with poor vision. This fulfills https://savannah.gnu.org/bugs/?54654. Requested-by: Ben Key <benk1976@yahoo.com>
This commit is contained in:
parent
2a894213e0
commit
10d9742c11
@ -1168,8 +1168,8 @@ void shortcut_init(void)
|
|||||||
add_to_sclist(MMOST, "^F", 0, do_right, 0);
|
add_to_sclist(MMOST, "^F", 0, do_right, 0);
|
||||||
#ifdef ENABLE_UTF8
|
#ifdef ENABLE_UTF8
|
||||||
if (using_utf8()) {
|
if (using_utf8()) {
|
||||||
add_to_sclist(MMOST, "\xE2\x97\x80", KEY_LEFT, do_left, 0);
|
add_to_sclist(MMOST|MHELP, "\xE2\x97\x80", KEY_LEFT, do_left, 0);
|
||||||
add_to_sclist(MMOST, "\xE2\x96\xb6", KEY_RIGHT, do_right, 0);
|
add_to_sclist(MMOST|MHELP, "\xE2\x96\xb6", KEY_RIGHT, do_right, 0);
|
||||||
add_to_sclist(MSOME, "^\xE2\x97\x80", CONTROL_LEFT, do_prev_word_void, 0);
|
add_to_sclist(MSOME, "^\xE2\x97\x80", CONTROL_LEFT, do_prev_word_void, 0);
|
||||||
add_to_sclist(MSOME, "^\xE2\x96\xb6", CONTROL_RIGHT, do_next_word_void, 0);
|
add_to_sclist(MSOME, "^\xE2\x96\xb6", CONTROL_RIGHT, do_next_word_void, 0);
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifdef ENABLE_MULTIBUFFER
|
||||||
@ -1183,8 +1183,8 @@ void shortcut_init(void)
|
|||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
add_to_sclist(MMOST, "Left", KEY_LEFT, do_left, 0);
|
add_to_sclist(MMOST|MHELP, "Left", KEY_LEFT, do_left, 0);
|
||||||
add_to_sclist(MMOST, "Right", KEY_RIGHT, do_right, 0);
|
add_to_sclist(MMOST|MHELP, "Right", KEY_RIGHT, do_right, 0);
|
||||||
add_to_sclist(MSOME, "^Left", CONTROL_LEFT, do_prev_word_void, 0);
|
add_to_sclist(MSOME, "^Left", CONTROL_LEFT, do_prev_word_void, 0);
|
||||||
add_to_sclist(MSOME, "^Right", CONTROL_RIGHT, do_next_word_void, 0);
|
add_to_sclist(MSOME, "^Right", CONTROL_RIGHT, do_next_word_void, 0);
|
||||||
}
|
}
|
||||||
|
@ -183,13 +183,16 @@ void do_help(void)
|
|||||||
focusing = TRUE;
|
focusing = TRUE;
|
||||||
|
|
||||||
/* Show the cursor when we searched and found something. */
|
/* Show the cursor when we searched and found something. */
|
||||||
kbinput = get_kbinput(edit, didfind == 1);
|
kbinput = get_kbinput(edit, didfind == 1 || ISSET(SHOW_CURSOR));
|
||||||
didfind = 0;
|
didfind = 0;
|
||||||
|
|
||||||
func = parse_help_input(&kbinput);
|
func = parse_help_input(&kbinput);
|
||||||
|
|
||||||
if (func == total_refresh) {
|
if (func == total_refresh) {
|
||||||
total_redraw();
|
total_redraw();
|
||||||
|
} else if (ISSET(SHOW_CURSOR) && (func == do_left || func == do_right ||
|
||||||
|
func == do_up || func == do_down)) {
|
||||||
|
func();
|
||||||
} else if (func == do_up) {
|
} else if (func == do_up) {
|
||||||
do_scroll_up();
|
do_scroll_up();
|
||||||
} else if (func == do_down) {
|
} else if (func == do_down) {
|
||||||
|
Loading…
Reference in New Issue
Block a user