From 973addcde8a864fece0a0e7df528c82781a32c58 Mon Sep 17 00:00:00 2001
From: Chris Allegretta <chrisa@asty.org>
Date: Wed, 15 Oct 2008 01:25:25 +0000
Subject: [PATCH]         * global.c (shortcut_init), search.c (search_init):
 Fix add_to_sclist for ^W^T so           invalid messages will display
 properly.  Fixes Savannah bug 24507.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4343 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog    | 2 ++
 src/global.c | 2 +-
 src/search.c | 3 ++-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b8187860..36c011ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 2008-10-14 Chris Allegretta <chrisa@asty.org>
 	* nanorc.5: Fix redo man page entry and update explanation, reported by
 	  Eitan Adler <eitanadlerlist@gmail.com>
+	* global.c (shortcut_init), search.c (search_init): Fix add_to_sclist for ^W^T so
+	  invalid messages will display properly.  Fixes Savannah bug 24507.
 
 2008-10-13 Chris Allegretta <chrisa@asty.org>
 	* Remove CUTTOEND as an undo type as it's unneeded, fix u->to_end logic in undo struct.
diff --git a/src/global.c b/src/global.c
index dd25914b..b2f837e4 100644
--- a/src/global.c
+++ b/src/global.c
@@ -1045,7 +1045,7 @@ void shortcut_init(bool unjustify)
     add_to_sclist(MMAIN, "M-R", do_replace, 0, TRUE);
     add_to_sclist(MWHEREIS, "^R", do_replace, 0, FALSE);
     add_to_sclist(MREPLACE, "^R", (void *) no_replace_msg, 0, FALSE);
-    add_to_sclist(MWHEREIS, "^T", do_gotolinecolumn_void, 0, TRUE);
+    add_to_sclist(MWHEREIS, "^T", do_gotolinecolumn_void, 0, FALSE);
 #ifndef NANO_TINY
     add_to_sclist(MMAIN, "^^", do_mark, 0, TRUE);
     add_to_sclist(MMAIN, "F15", do_mark, 0, TRUE);
diff --git a/src/search.c b/src/search.c
index 64ff953d..3e7123cf 100644
--- a/src/search.c
+++ b/src/search.c
@@ -254,12 +254,13 @@ int search_init(bool replacing, bool use_answer)
 	  func == (void *) no_replace_msg) {
 		backupstring = mallocstrcpy(backupstring, answer);
 		return -2;	/* Call the opposite search function. */
-	} else if (func == (void *) go_to_line_msg) {
+	} else if (func == do_gotolinecolumn_void) {
 		do_gotolinecolumn(openfile->current->lineno,
 			openfile->placewewant + 1, TRUE, TRUE, FALSE,
 			TRUE);
 				/* Put answer up on the statusbar and
 				 * fall through. */
+		return 3;
 	} else {
 		return -1;
 	}
-- 
GitLab