From: ezyang@MIT.EDU (Edward Z. Yang)
Subject: [sup-talk] Odd key bug
Date: Mon, 27 Jul 2009 15:15:27 -0400 [thread overview]
Message-ID: <1248721402-sup-3517@javelin> (raw)
In-Reply-To: <1248719342-sup-9126@javelin>
Alex Vandiver points out that stdscr is a member variable of Ncurses.
As such, this patch appears to fix the issue.
However, my rationale in my previous message was completely bogus (I
checked the manpage and keypad does NOT send a null key); thus,
I have no fucking clue why this works. Perhaps forcibly setting this
setting clears some internal buffer. Either 1 or 0 works, we probably
want 1 since that's what bin/sup sets.
Yay cargo culting! Whoo!
From 61696b6a097a949545db52b4a537d74f8256d807 Mon Sep 17 00:00:00 2001
From: Edward Z. Yang <ezyang at mit.edu>
Date: Mon, 27 Jul 2009 15:03:58 -0400
Subject: [PATCH] Fix broken arrow keypresses after shelling out.
Signed-off-by: Edward Z. Yang <ezyang at mit.edu>
---
lib/sup/buffer.rb | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb
index 8eedf96..5f52d1d 100644
--- a/lib/sup/buffer.rb
+++ b/lib/sup/buffer.rb
@@ -723,6 +723,7 @@ EOS
Ncurses.sync do
Ncurses.endwin
system command
+ Ncurses.stdscr.keypad 1
Ncurses.refresh
Ncurses.curs_set 0
end
--
1.6.3.3
next prev parent reply other threads:[~2009-07-27 19:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-27 17:13 Edward Z. Yang
2009-07-27 17:27 ` Alex Vandiver
2009-07-27 17:52 ` Ben Walton
2009-07-27 17:33 ` William Morgan
2009-07-27 18:13 ` Edward Z. Yang
2009-07-27 18:30 ` Edward Z. Yang
2009-07-27 19:15 ` Edward Z. Yang [this message]
2009-07-28 15:17 ` William Morgan
2009-07-28 15:31 ` Ben Walton
2009-07-27 18:47 ` Tarko Tikan
2009-07-27 20:11 ` Andrew Pimlott
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=1248721402-sup-3517@javelin \
--to=ezyang@mit.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