mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-27 12:49:45 +03:00
display: redraw the screen in tiny version upon resuming from suspension
Letting the dummy key KEY_FRESH do a full refresh in the tiny version allows a 'fg' to properly resume after an external SIGSTOP. (Reminder: the ungetch() is needed in the normal version to prevent the eating of a keystroke: https://savannah.gnu.org/bugs/?48331.)
This commit is contained in:
parent
d14d9069cd
commit
b5448615b9
@ -218,7 +218,7 @@
|
||||
#define FOREIGN_SEQUENCE 0x4FC
|
||||
|
||||
/* A special keycode for plugging into the input stream after a suspension. */
|
||||
#define KEY_FLUSH KEY_F0
|
||||
#define KEY_FRESH 0x4FE
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* A special keycode for when we get a SIGWINCH (a window resize). */
|
||||
|
@ -1503,6 +1503,8 @@ void shortcut_init(void)
|
||||
add_to_sclist(MMAIN, "", KEY_SIC, do_insertfile, 0);
|
||||
/* Catch and ignore bracketed paste marker keys. */
|
||||
add_to_sclist(MMOST|MBROWSER|MHELP|MYESNO, "", BRACKETED_PASTE_MARKER, do_nothing, 0);
|
||||
#else
|
||||
add_to_sclist(MMOST|MBROWSER|MHELP|MYESNO, "", KEY_FRESH, full_refresh, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -991,7 +991,7 @@ void continue_nano(int signal)
|
||||
#endif
|
||||
|
||||
/* Insert a fake keystroke, to neutralize a key-eating issue. */
|
||||
ungetch(KEY_FLUSH);
|
||||
ungetch(KEY_FRESH);
|
||||
}
|
||||
|
||||
#if !defined(NANO_TINY) || defined(ENABLE_SPELLER) || defined(ENABLE_COLOR)
|
||||
|
@ -1263,7 +1263,9 @@ int parse_kbinput(WINDOW *win)
|
||||
#ifdef KEY_RESIZE /* SunOS 5.7-5.9 doesn't know KEY_RESIZE. */
|
||||
case KEY_RESIZE:
|
||||
#endif
|
||||
case KEY_FLUSH:
|
||||
#ifndef NANO_TINY
|
||||
case KEY_FRESH:
|
||||
#endif
|
||||
return ERR; /* Ignore this keystroke. */
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user