dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git
Log | Files | Refs | README | LICENSE

commit 3e6a1f4a31c0a74607ac4fa91f2db246280727b6
parent 41901a2fe51fc78a35827e3e6bc5613204711f95
Author: Marc Andre Tanner <mat@brain-dump.org>
Date:   Mon, 25 Feb 2008 17:21:25 +0100

Use the new madtty_keypress_sequence function.

Diffstat:
dvtm.c | 13+++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/dvtm.c b/dvtm.c @@ -965,13 +965,18 @@ main(int argc, char *argv[]) { } else { keypress: if(sel && (!sel->minimized || isarrange(fullscreen))){ - madtty_keypress(sel->term, code); if(code == '\e') { + /* pass characters following escape to the underlying app */ + char buf[8] = { '\e' }; + int len = 1; nodelay(stdscr, TRUE); - while((code = getch()) != ERR) - madtty_keypress(sel->term, code); + while(len < sizeof(buf) - 1 && (code = getch()) != ERR) + buf[len++] = code; + buf[len] = '\0'; nodelay(stdscr, FALSE); - } + madtty_keypress_sequence(sel->term, buf); + } else + madtty_keypress(sel->term, code); if(r == 1){ draw_content(sel); wrefresh(sel->window);