You need to sign in or sign up before continuing.
Commit 990a695f authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

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
parent 6f499096
Showing with 8 additions and 10 deletions
+8 -10
...@@ -160,6 +160,7 @@ char *do_browser(char *path, DIR *dir) ...@@ -160,6 +160,7 @@ char *do_browser(char *path, DIR *dir)
/* Redraw the screen. */ /* Redraw the screen. */
case NANO_REFRESH_KEY: case NANO_REFRESH_KEY:
total_redraw(); total_redraw();
kbinput = ERR;
break; break;
case NANO_HELP_KEY: case NANO_HELP_KEY:
#ifndef DISABLE_HELP #ifndef DISABLE_HELP
...@@ -351,11 +352,9 @@ char *do_browser(char *path, DIR *dir) ...@@ -351,11 +352,9 @@ char *do_browser(char *path, DIR *dir)
goto change_browser_directory; goto change_browser_directory;
} }
/* Display the file list if we don't have a key, we do have a /* Display the file list if we don't have a key, or if we do
* key and the selected file has changed, or if we haven't * have a key and the selected file has changed. */
* updated the screen already. */ if (kbinput == ERR || old_selected == selected)
if ((kbinput == ERR || old_selected == selected) && kbinput !=
NANO_REFRESH_KEY)
browser_refresh(); browser_refresh();
kbinput = get_kbinput(edit, &meta_key, &func_key); kbinput = get_kbinput(edit, &meta_key, &func_key);
......
...@@ -107,6 +107,7 @@ void do_help(void (*refresh_func)(void)) ...@@ -107,6 +107,7 @@ void do_help(void (*refresh_func)(void))
#endif #endif
case NANO_REFRESH_KEY: case NANO_REFRESH_KEY:
total_redraw(); total_redraw();
kbinput = ERR;
break; break;
case NANO_PREVPAGE_KEY: case NANO_PREVPAGE_KEY:
if (line > editwinrows - 2) if (line > editwinrows - 2)
...@@ -138,11 +139,9 @@ void do_help(void (*refresh_func)(void)) ...@@ -138,11 +139,9 @@ void do_help(void (*refresh_func)(void))
break; break;
} }
/* Display the help text if we don't have a key, we do have a /* Display the help text if we don't have a key, or if we do
* key and the help text has moved, or if we haven't updated the * have a key and the help text has moved. */
* screen already. */ if (kbinput == ERR || line != old_line) {
if ((kbinput == ERR || line != old_line) && kbinput !=
NANO_REFRESH_KEY) {
blank_edit(); blank_edit();
/* Calculate where in the text we should be, based on the /* Calculate where in the text we should be, based on the
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment