diff --git a/ChangeLog b/ChangeLog index b818786093d69892d4f095e0000e6c31d62ba4d9..36c011ee2a125865dda37c8d2d9f4ec9b8b6adab 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 dd25914b1056cf81be0d6d76d81f225ba269175c..b2f837e4ace248e417f60ea8cf3e71556ef49932 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 64ff953d94532bf3e398172599a0ae0dd65bd69e..3e7123cf225ab3a3b7b99cbcf1cf75e26094d650 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; }