~vcs-imports/nano/master

« back to all changes in this revision

Viewing changes to src/nano.c

  • Committer: Benno Schulenberg
  • Date: 2023-10-16 06:55:06 UTC
  • Revision ID: git-v1:ef35ea72cfaada26f6ee1ca3473e1ce78481f6b7
input: neutralize two spurious keycodes from VTE terminals

At least some of the VTE-based terminals claim to be compatible with
xterm-25color (and set TERM to that value).  But they really aren't:
they mishandle the focus-in and focus-out events, for example.  So,
catch and discard the corresponding keycodes that nano shouldn't be
seeing at all.

This improves the fix for https://savannah.gnu.org/bugs/?64578.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2426
2426
        shiftaltup = get_keycode("kUP4", SHIFT_ALT_UP);
2427
2427
        shiftaltdown = get_keycode("kDN4", SHIFT_ALT_DOWN);
2428
2428
#endif
 
2429
        mousefocusin = get_keycode("kxIN", FOCUS_IN);
 
2430
        mousefocusout = get_keycode("kxOUT", FOCUS_OUT);
2429
2431
 
2430
2432
#ifdef HAVE_SET_ESCDELAY
2431
2433
        /* Tell ncurses to pass the Esc key quickly. */