From 40ae394b6adf3268ce7bb0bbf58a20fa4db0e673 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 25 Jun 2014 09:17:38 +0000
Subject: [PATCH] Allowing 'firstline' and 'lastline' to be rebound to Ctrl
 keys.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5020 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog  | 1 +
 src/help.c | 9 +++------
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 45326494..83c17456 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 	* src/browser.c (do_browser): Allow 'firstfile' and 'lastfile' to be
 	rebound to Ctrl keys -- checking meta_key is wrong, the function has
 	already been determined, that is all that matters.
+	* src/help.c (do_help): Same thing for 'firstline'/'lastline'.
 
 2014-06-23  Benno Schulenberg  <bensberg@justemail.net>
 	* src/nano.h, src/move.c (do_up, do_down), src/winio.c (edit_scrol):
diff --git a/src/help.c b/src/help.c
index a52a9e4a..ceaff06a 100644
--- a/src/help.c
+++ b/src/help.c
@@ -158,13 +158,10 @@ void do_help(void (*refresh_func)(void))
 	    if (line + (editwinrows - 1) < last_line)
 		line++;
 	} else if (f->scfunc == do_first_line) {
-	    if (meta_key)
-		line = 0;
+	    line = 0;
 	} else if (f->scfunc == do_last_line) {
-	    if (meta_key) {
-		if (line + (editwinrows - 1) < last_line)
-		    line = last_line - (editwinrows - 1);
-	    }
+	    if (line + (editwinrows - 1) < last_line)
+		line = last_line - (editwinrows - 1);
 	} else if (f->scfunc == do_exit) {
 	    /* Exit from the help browser. */
 	    break;
-- 
GitLab