From f7b8783eaaa0bc0d8f3ccd63e88d168fc3f2c06e Mon Sep 17 00:00:00 2001
From: David Lawrence Ramsey <pooka109@gmail.com>
Date: Tue, 22 Aug 2006 18:48:13 +0000
Subject: [PATCH] in shortcut_init(), remove the ^X shortcut for CutTillEnd at
 the search prompt, as official Pico doesn't include it, and it can be
 confused with Exit

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

diff --git a/ChangeLog b/ChangeLog
index fc218bf7..ea5f8fbe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -117,9 +117,13 @@ CVS code -
 	  we can still recover from that. (DLR, found by Mike Frysinger)
 	- Add various cleanups. (DLR)
 - global.c:
-  shortcut_init(), sc_init_one()
+  sc_init_one(), shortcut_init()
 	- Don't include blank_after when DISABLE_HELP is defined, as
 	  it's never used then. (DLR)
+  shortcut_init()
+	- Remove the ^X shortcut for CutTillEnd at the search prompt, as
+	  official Pico doesn't include it, and it can be confused with
+	  Exit. (DLR, suggested by Benno Schulenberg)
   toggle_init()
 	- Don't include desc or blank_after when DISABLE_HELP is
 	  defined, as neither are ever used then. (DLR)
diff --git a/src/global.c b/src/global.c
index 75173e3e..8a47b8b9 100644
--- a/src/global.c
+++ b/src/global.c
@@ -280,9 +280,6 @@ void shortcut_init(bool unjustify)
      * characters. */
     const char *first_line_msg = N_("First Line");
     const char *last_line_msg = N_("Last Line");
-#ifndef NANO_TINY
-    const char *cut_till_end_msg = N_("CutTillEnd");
-#endif
 #ifndef DISABLE_JUSTIFY
     const char *beg_of_par_msg = N_("Beg of Par");
     const char *end_of_par_msg = N_("End of Par");
@@ -698,7 +695,7 @@ void shortcut_init(bool unjustify)
 	, NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_backspace);
 
 #ifndef NANO_TINY
-    sc_init_one(&main_list, NANO_NO_KEY, cut_till_end_msg,
+    sc_init_one(&main_list, NANO_NO_KEY, N_("CutTillEnd"),
 	IFSCHELP(nano_cut_till_end_msg, TRUE, NANO_CUTTILLEND_ALTKEY),
 	NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_cut_till_end);
 #endif
@@ -790,10 +787,6 @@ void shortcut_init(bool unjustify)
     sc_init_one(&whereis_list, NANO_NEXTLINE_KEY, next_history_msg,
 	IFSCHELP(nano_next_history_msg, FALSE, NANO_NO_KEY),
 	NANO_NO_KEY, NANO_NO_KEY, VIEW, NULL);
-
-    sc_init_one(&whereis_list, NANO_CUTTILLEND_KEY, cut_till_end_msg,
-	IFSCHELP(nano_cut_till_end_msg, FALSE, NANO_CUTTILLEND_ALTKEY),
-	NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_cut_till_end);
 #endif
 
 #ifndef DISABLE_JUSTIFY
diff --git a/src/nano.h b/src/nano.h
index c8498d1d..389a1076 100644
--- a/src/nano.h
+++ b/src/nano.h
@@ -563,7 +563,6 @@ typedef struct rcoption {
 #define NANO_SCROLLDOWN_KEY		NANO_ALT_PLUS
 #define NANO_SCROLLUP_ALTKEY		NANO_ALT_UNDERSCORE
 #define NANO_SCROLLDOWN_ALTKEY		NANO_ALT_EQUALS
-#define NANO_CUTTILLEND_KEY		NANO_CONTROL_X
 #define NANO_CUTTILLEND_ALTKEY		NANO_ALT_T
 #define NANO_PARABEGIN_KEY		NANO_CONTROL_W
 #define NANO_PARABEGIN_ALTKEY		NANO_ALT_LPARENTHESIS
-- 
GitLab