Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
sylpheed vi/less keybind patch on summaryview
Index: src/summaryview.c
===================================================================
--- src/summaryview.c (revision 3616)
+++ src/summaryview.c (working copy)
@@ -6122,22 +6122,26 @@
((event->state & (GDK_SHIFT_MASK|GDK_MOD1_MASK)) != 0);
switch (event->keyval) {
- case GDK_space: /* Page down or go to the next */
- case GDK_KP_Space:
+ case GDK_j: /* Page down or go to the next */
+ case GDK_k:
if (summaryview->selected &&
!gtkut_tree_row_reference_equal(summaryview->displayed,
summaryview->selected)) {
summary_display_msg_selected(summaryview, FALSE, FALSE);
summary_mark_displayed_read(summaryview, NULL);
- } else if (mod_pressed) {
- scrolled = textview_scroll_page(textview, TRUE);
- if (!scrolled)
- summary_select_prev_unread(summaryview);
} else {
scrolled = textview_scroll_page(textview, FALSE);
summary_mark_displayed_read(summaryview, NULL);
- if (!scrolled)
- summary_select_next_unread(summaryview);
+ if (!scrolled) {
+ switch (event->keyval) {
+ case GDK_j:
+ summary_select_next_unread(summaryview);
+ break;
+ case GDK_k:
+ summary_select_prev_unread(summaryview);
+ break;
+ }
+ }
}
return TRUE;
case GDK_BackSpace: /* Page up */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment