diff --git a/ChangeLog b/ChangeLog index b8187860..36c011ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2008-10-14 Chris Allegretta * nanorc.5: Fix redo man page entry and update explanation, reported by Eitan Adler + * 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 * 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; }