From 9cf1df1f06e9fc70f374a3bc4ada53db14a9591d Mon Sep 17 00:00:00 2001
From: David Lawrence Ramsey <pooka109@gmail.com>
Date: Tue, 19 Apr 2005 03:15:21 +0000
Subject: [PATCH] in do_browser() and do_help(), don't treat NANO_CANCEL_KEY as
 NANO_EXIT_KEY anymore, for consistency

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2478 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog   |  6 ++++++
 src/files.c |  1 -
 src/winio.c | 13 ++++++-------
 3 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0a74dd25..7bf06ff4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,9 @@ CVS code -
   get_next_filename()
 	- Use a long instead of an int for the number prepended to the
 	  filename. (DLR)
+  do_browser()
+	- Don't treat NANO_CANCEL_KEY as NANO_EXIT_KEY anymore, for
+	  consistency. (DLR)
 - nano.c:
   help_init()
 	- Remove extra space from main help text (Jordi).
@@ -26,6 +29,9 @@ CVS code -
   num_of_digits()
 	- Use a ssize_t instead of an int. (DLR)
 - winio.c:
+  do_help()
+	- Don't treat NANO_CANCEL_KEY as NANO_EXIT_KEY anymore, for
+	  consistency. (DLR)
   total_update()
 	- Simplify to call clearok(TRUE) and wrefresh() on curscr, which
 	  updates the entire screen in fewer function calls. (DLR)
diff --git a/src/files.c b/src/files.c
index 48d0caac..4e550fdd 100644
--- a/src/files.c
+++ b/src/files.c
@@ -2652,7 +2652,6 @@ char *do_browser(char *path, DIR *dir)
 		goto change_browser_directory;
 
 	    /* Abort the browser. */
-	    case NANO_CANCEL_KEY:
 	    case NANO_EXIT_KEY:
 	    case NANO_EXIT_FKEY:
 	    case 'E': /* Pico compatibility. */
diff --git a/src/winio.c b/src/winio.c
index b818f5a3..f07d6d78 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -3907,11 +3907,6 @@ void do_help(void)
 		}
 		break;
 #endif
-	    case NANO_NEXTPAGE_KEY:
-	    case NANO_NEXTPAGE_FKEY:
-		if (!no_more)
-		    line += editwinrows - 2;
-		break;
 	    case NANO_PREVPAGE_KEY:
 	    case NANO_PREVPAGE_FKEY:
 		if (line > 0) {
@@ -3920,6 +3915,11 @@ void do_help(void)
 			line = 0;
 		}
 		break;
+	    case NANO_NEXTPAGE_KEY:
+	    case NANO_NEXTPAGE_FKEY:
+		if (!no_more)
+		    line += editwinrows - 2;
+		break;
 	    case NANO_PREVLINE_KEY:
 		if (line > 0)
 		    line--;
@@ -3959,8 +3959,7 @@ void do_help(void)
 
   skip_redisplay:
 	kbinput = get_kbinput(edit, &meta_key, &func_key);
-    } while (kbinput != NANO_CANCEL_KEY && kbinput != NANO_EXIT_KEY &&
-	kbinput != NANO_EXIT_FKEY);
+    } while (kbinput != NANO_EXIT_KEY && kbinput != NANO_EXIT_FKEY);
 
 #ifndef DISABLE_MOUSE
     currshortcut = oldshortcut;
-- 
GitLab