]> git.wh0rd.org Git - nano.git/commitdiff
avoid unnecessary scrolling when moving to the last line of the help
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Mon, 22 May 2006 02:23:56 +0000 (02:23 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Mon, 22 May 2006 02:23:56 +0000 (02:23 +0000)
text

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

src/help.c

index 90f503435342b0cd0df10c72df02a9ee95abdc5a..611045b2ac46e0d3ca58c04242ed818b3a8434cc 100644 (file)
@@ -131,8 +131,10 @@ void do_help(void (*refresh_func)(void))
                    line = 0;
                break;
            case NANO_LASTLINE_ALTKEY:
-               if (meta_key && last_line > editwinrows)
-                   line = last_line - (editwinrows - 1);
+               if (meta_key) {
+                   if (line + (editwinrows - 1) < last_line)
+                       line = last_line - (editwinrows - 1);
+               }
                break;
        }