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>
master
Benno Schulenberg 2018-10-02 19:59:59 +02:00
parent 2a894213e0
commit 10d9742c11
2 changed files with 8 additions and 5 deletions

View File

@ -1168,8 +1168,8 @@ void shortcut_init(void)
add_to_sclist(MMOST, "^F", 0, do_right, 0);
#ifdef ENABLE_UTF8
if (using_utf8()) {
add_to_sclist(MMOST, "\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\x97\x80", KEY_LEFT, do_left, 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\x96\xb6", CONTROL_RIGHT, do_next_word_void, 0);
#ifdef ENABLE_MULTIBUFFER
@ -1183,8 +1183,8 @@ void shortcut_init(void)
} else
#endif
{
add_to_sclist(MMOST, "Left", KEY_LEFT, do_left, 0);
add_to_sclist(MMOST, "Right", KEY_RIGHT, do_right, 0);
add_to_sclist(MMOST|MHELP, "Left", KEY_LEFT, do_left, 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, "^Right", CONTROL_RIGHT, do_next_word_void, 0);
}

View File

@ -183,13 +183,16 @@ void do_help(void)
focusing = TRUE;
/* 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;
func = parse_help_input(&kbinput);
if (func == total_refresh) {
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) {
do_scroll_up();
} else if (func == do_down) {