sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit d0df936c88044fc3925812da5f5e2b0731cbffbc
parent 05b44ef2a7753f0ac2a5288b801e1b88d8761f1e
Author: Marc Hartstein <marc.hartstein@alum.vassar.edu>
Date:   Wed, 23 Apr 2008 20:43:13 -0400

fix alignment when printing help screen if \C-x is bound.

Width calculations were getting off by one, causing truncated definitions.

Diffstat:
M lib/sup/keymap.rb | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/lib/sup/keymap.rb b/lib/sup/keymap.rb
@@ -43,16 +43,10 @@ class Keymap
     when :home: "<home>"
     when :end: "<end>"
     when :enter, :return: "<enter>"
-    when :ctrl_l: "ctrl-l"
-    when :ctrl_g: "ctrl-g"
     when :tab: "tab"
     when " ": "<space>"
     else
-      if k.is_a?(String) && k.length == 1
-        k
-      else
-        raise ArgumentError, "unknown key name \"#{k}\""
-      end
+      Curses::keyname(keysym_to_keycode k)
     end
   end