nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 990a695f5459f78e8f2b7a01f26aa23f5cda6d56
parent 6f499096ad5968f7da0b576519e3e9b41e312401
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Fri, 30 Jun 2006 21:06:15 +0000

in do_browser() and do_refresh(), further simplify screen update
handling


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3709 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
Msrc/browser.c | 9++++-----
Msrc/help.c | 9++++-----
2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/src/browser.c b/src/browser.c @@ -160,6 +160,7 @@ char *do_browser(char *path, DIR *dir) /* Redraw the screen. */ case NANO_REFRESH_KEY: total_redraw(); + kbinput = ERR; break; case NANO_HELP_KEY: #ifndef DISABLE_HELP @@ -351,11 +352,9 @@ char *do_browser(char *path, DIR *dir) goto change_browser_directory; } - /* Display the file list if we don't have a key, we do have a - * key and the selected file has changed, or if we haven't - * updated the screen already. */ - if ((kbinput == ERR || old_selected == selected) && kbinput != - NANO_REFRESH_KEY) + /* Display the file list if we don't have a key, or if we do + * have a key and the selected file has changed. */ + if (kbinput == ERR || old_selected == selected) browser_refresh(); kbinput = get_kbinput(edit, &meta_key, &func_key); diff --git a/src/help.c b/src/help.c @@ -107,6 +107,7 @@ void do_help(void (*refresh_func)(void)) #endif case NANO_REFRESH_KEY: total_redraw(); + kbinput = ERR; break; case NANO_PREVPAGE_KEY: if (line > editwinrows - 2) @@ -138,11 +139,9 @@ void do_help(void (*refresh_func)(void)) break; } - /* Display the help text if we don't have a key, we do have a - * key and the help text has moved, or if we haven't updated the - * screen already. */ - if ((kbinput == ERR || line != old_line) && kbinput != - NANO_REFRESH_KEY) { + /* Display the help text if we don't have a key, or if we do + * have a key and the help text has moved. */ + if (kbinput == ERR || line != old_line) { blank_edit(); /* Calculate where in the text we should be, based on the