partial fix for #K3869 - curses: meta characters
Meta-key fix for curses interface running on top of ncurses library. Previously only digits and lower case letters would produce a meta character when combined with Alt (or Option on Apple keyboards), now it should work for any basic character (not arrows or other function keys). It only works on terminals that send two characters ESC k for Alt+k but that is not a change in behavior. curses interface running on top of PDcurses library uses different code which isn't fixed by this. The alt key fixup it does have was already present in curses_read_char() and recently got duplicated in curses_convert_keys(). At least one other routine calls the latter so it was necessary, but curses_read_char() calls that routine so doesn't need to keep its own copy of the fixup.
This commit is contained in:
@@ -1541,7 +1541,7 @@ menu_get_selections(WINDOW *win, nhmenu *menu, int how)
|
||||
if (isdigit(curletter) && !groupaccels[curletter]) {
|
||||
count = curses_get_count(curletter);
|
||||
/* after count, we know some non-digit is already pending */
|
||||
curletter = getch();
|
||||
curletter = curses_getch();
|
||||
count_letter = (count > 0L) ? curletter : '\0';
|
||||
|
||||
/* remove the count wind (erases last line of message wind) */
|
||||
|
||||
Reference in New Issue
Block a user