Package: hnb
Version: 1.9.18-10

Moving nodes up and down with with the shift key as described in the
documentation did not work, instead getting errors:

No action assigned to 'SR'(337d) in main-mode
and
No action assigned to 'SF'(336d) in main-mode

for shift-up and shift-down respectively.

I don't know if it's the cleanest fix, but I added:

{KEY_SR, "sup"},
{KEY_SF, "sdown"},

to src/ui_binding.c and changing

bind sprevious "movenode up"
bind snext "movenode down"

to

bind sup "movenode up"
bind sdown "movenode down"

in doc/hnbrc. I ignored anything else to do with "previous" and "next"
as I'm not clear on the semantics.

Patch attached.
From 1348dba6be2f143a21cf3d0e5fa997a8c45c65db Mon Sep 17 00:00:00 2001
From: Tal Stokes <welshbard...@gmail.com>
Date: Wed, 20 Jan 2016 22:09:05 +0000
Subject: [PATCH] fix keys

---
 doc/hnbrc        | 4 ++--
 src/ui_binding.c | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/doc/hnbrc b/doc/hnbrc
index 5ce1518..beb5277 100644
--- a/doc/hnbrc
+++ b/doc/hnbrc
@@ -233,8 +233,8 @@
 		
 		bind sleft "movenode left"
 		bind sright	 "movenode right"
-		bind sprevious "movenode up"
-		bind snext "movenode down"
+		bind sup "movenode up"
+		bind sdown "movenode down"
 		
 		bind + expand
 		bind - collapse
diff --git a/src/ui_binding.c b/src/ui_binding.c
index 00c4d73..f593b86 100644
--- a/src/ui_binding.c
+++ b/src/ui_binding.c
@@ -142,6 +142,8 @@ static keydbitm keydb[] = {
 	{KEY_SEND, "send"},
 	{KEY_SEOL, "seol"},
 	{KEY_SEXIT, "sexit"},
+	{KEY_SR, "sup"},
+	{KEY_SF, "sdown"},
 	{KEY_SFIND, "sfind"},
 	{KEY_SHELP, "shelp"},
 	{KEY_SHOME, "shome"},
-- 
1.9.1

Reply via email to