Skip to content

Instantly share code, notes, and snippets.

@atomicules
Created March 3, 2013 23:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atomicules/5078912 to your computer and use it in GitHub Desktop.
Save atomicules/5078912 to your computer and use it in GitHub Desktop.
Small patch to snownews keybindings to provide more mutt like behaviour. Space does Enter in list view, but next page in reading view. You need to set appropriate user keybindings in conjunction with this patch.
---
interface.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/interface.c b/interface.c
index 6b28a51..78ca3c2 100644
--- a/interface.c
+++ b/interface.c
@@ -289,7 +289,7 @@ void UIDisplayItem (struct newsitem * current_item, struct feed * current_feed,
(uiinput == '?'))
UIDisplayItemHelp();
if ((uiinput == '\n') ||
- (uiinput == keybindings.prevmenu) || (uiinput == keybindings.enter)) {
+ (uiinput == keybindings.prevmenu)) {
/* Free the wrapped text linked list.
Why didn't valgrind find this? Counted as "still reachable".
Strange voodoo magic may be going on here! Maybe we just append
@@ -722,8 +722,7 @@ int UIDisplayFeed (struct feed * current_feed) {
}
}
/* Move highlight one page up/down == LINES-9 */
- if ((uiinput == KEY_NPAGE) || (uiinput == 32) ||
- (uiinput == keybindings.pdown)) {
+ if ((uiinput == KEY_NPAGE) || (uiinput == keybindings.pdown)) {
if (highlighted != NULL) {
for (i = highlightnum; i <= LINES-8; i++) {
if (highlighted->next_ptr != NULL) {
@@ -1436,8 +1435,7 @@ void UIMainInterface (void) {
}
}
/* Move highlight one page up/down == LINES-6 */
- if ((uiinput == KEY_NPAGE) || (uiinput == 32) ||
- (uiinput == keybindings.pdown)) {
+ if ((uiinput == KEY_NPAGE) || (uiinput == keybindings.pdown)) {
if (highlighted != NULL) {
for (i = highlightnum; i <= LINES-5; i++) {
if (highlighted->next_ptr != NULL) {
--
1.8.1.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment