Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: marc.hartstein@alum.vassar.edu (Marc Hartstein)
Subject: [sup-talk] [PATCH] Fixes alignment when printing help screen if \C-x is bound.
Date: Wed, 23 Apr 2008 20:43:13 -0400	[thread overview]
Message-ID: <1208997793-14546-2-git-send-email-marc.hartstein@alum.vassar.edu> (raw)
In-Reply-To: <1208997793-14546-1-git-send-email-marc.hartstein@alum.vassar.edu>

Width calculations were getting off by one, causing truncated definitions.
---
 lib/sup/keymap.rb |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/lib/sup/keymap.rb b/lib/sup/keymap.rb
index 3176415..080e11d 100644
--- 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
 
-- 
1.5.3.7



  reply	other threads:[~2008-04-24  0:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-24  0:43 [sup-talk] [PATCH] Vi-style scroll keys Marc Hartstein
2008-04-24  0:43 ` Marc Hartstein [this message]
2008-04-27  6:49 [sup-talk] [PATCH] Fixes alignment when printing help screen if \C-x is bound William Morgan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1208997793-14546-2-git-send-email-marc.hartstein@alum.vassar.edu \
    --to=marc.hartstein@alum.vassar.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox