changeset 22434:77737a3526f1

The names history-next and history-prev were backwards! Make them right, and add c-n/c-p bindings as the default bindings. Thanks to shofixti for reporting the bug. Fixes #4593.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 07 Mar 2008 16:51:36 +0000
parents 361b2e61a219
children d0675c9e0eaa
files finch/libgnt/gntentry.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gntentry.c	Fri Mar 07 01:27:25 2008 +0000
+++ b/finch/libgnt/gntentry.c	Fri Mar 07 16:51:36 2008 +0000
@@ -419,7 +419,7 @@
 }
 
 static gboolean
-history_prev(GntBindable *bind, GList *null)
+history_next(GntBindable *bind, GList *null)
 {
 	GntEntry *entry = GNT_ENTRY(bind);
 	if (entry->histlength && entry->history->prev)
@@ -436,7 +436,7 @@
 }
 
 static gboolean
-history_next(GntBindable *bind, GList *null)
+history_prev(GntBindable *bind, GList *null)
 {
 	GntEntry *entry = GNT_ENTRY(bind);
 	if (entry->histlength && entry->history->next)
@@ -904,10 +904,12 @@
 				GNT_KEY_DOWN, NULL);
 	gnt_bindable_class_register_action(bindable, "suggest-prev", suggest_prev,
 				GNT_KEY_UP, NULL);
-	gnt_bindable_class_register_action(bindable, "history-prev", history_prev,
+	gnt_bindable_class_register_action(bindable, "history-next", history_next,
 				GNT_KEY_CTRL_DOWN, NULL);
-	gnt_bindable_class_register_action(bindable, "history-next", history_next,
+	gnt_bindable_class_register_action(bindable, "history-prev", history_prev,
 				GNT_KEY_CTRL_UP, NULL);
+	gnt_bindable_register_binding(bindable, "history-prev", GNT_KEY_CTRL_P, NULL);
+	gnt_bindable_register_binding(bindable, "history-next", GNT_KEY_CTRL_N, NULL);
 	gnt_bindable_class_register_action(bindable, "clipboard-paste", clipboard_paste,
 				GNT_KEY_CTRL_V, NULL);