diff --git a/src/nano.c b/src/nano.c index 25601058..b82245a5 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1288,7 +1288,7 @@ RETSIGTYPE do_continue(int signal) terminal_init(); #endif /* Tickle the input routine so it will update the screen. */ - ungetch(KEY_F0); + ungetch(KEY_FLUSH); } #ifndef NANO_TINY diff --git a/src/nano.h b/src/nano.h index 2c1aef2a..c6ea016d 100644 --- a/src/nano.h +++ b/src/nano.h @@ -576,6 +576,15 @@ enum #define SHIFT_HOME 0x40f #define SHIFT_END 0x410 +#ifdef USE_SLANG +#ifdef ENABLE_UTF8 +#define KEY_BAD 0xFF /* Clipped error code. */ +#endif +#define KEY_FLUSH 0x91 /* User-definable control code. */ +#else +#define KEY_FLUSH KEY_F0 /* Nonexistent function key. */ +#endif + #ifndef NANO_TINY /* An imaginary key for when we get a SIGWINCH (window resize). */ #define KEY_WINCH -2 diff --git a/src/winio.c b/src/winio.c index fc058ac0..d9bde426 100644 --- a/src/winio.c +++ b/src/winio.c @@ -704,7 +704,10 @@ int parse_kbinput(WINDOW *win) /* Slang and SunOS 5.7-5.9 don't support KEY_RESIZE. */ case KEY_RESIZE: #endif - case KEY_F0: +#if defined(USE_SLANG) && defined(ENABLE_UTF8) + case KEY_BAD: +#endif + case KEY_FLUSH: return ERR; }