From mboxrd@z Thu Jan 1 00:00:00 1970 From: ezyang@MIT.EDU (Edward Z. Yang) Date: Mon, 27 Jul 2009 15:15:27 -0400 Subject: [sup-talk] Odd key bug In-Reply-To: <1248719342-sup-9126@javelin> References: <1248714653-sup-6926@javelin> <1248715911-sup-4656@masanjin.net> <1248718344-sup-1931@javelin> <1248719342-sup-9126@javelin> Message-ID: <1248721402-sup-3517@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 Date: Mon, 27 Jul 2009 15:03:58 -0400 Subject: [PATCH] Fix broken arrow keypresses after shelling out. Signed-off-by: Edward Z. Yang --- 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