changeset 21305:0208beabfa33

Cancel the typeahead search when escape is pressed.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 11 Nov 2007 19:42:02 +0000
parents add12afc3140
children 14f06265d134
files finch/gntblist.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntblist.c	Sat Nov 10 23:48:57 2007 +0000
+++ b/finch/gntblist.c	Sun Nov 11 19:42:02 2007 +0000
@@ -1506,6 +1506,8 @@
 {
 	if (text[0] == 27 && text[1] == 0) {
 		/* Escape was pressed */
+		if (gnt_tree_is_searching(GNT_TREE(ggblist->tree)))
+			gnt_bindable_perform_action_named(GNT_BINDABLE(ggblist->tree), "end-search", NULL);
 		remove_peripherals(ggblist);
 	} else if (strcmp(text, GNT_KEY_CTRL_O) == 0) {
 		purple_prefs_set_bool(PREF_ROOT "/showoffline",