]> git.pld-linux.org Git - packages/elinks.git/blame_incremental - elinks-double-esc.patch
- initialize unit_len_ctx
[packages/elinks.git] / elinks-double-esc.patch
... / ...
CommitLineData
1diff -urp elinks-0.12pre5.orig/src/terminal/kbd.c elinks-0.12pre5/src/terminal/kbd.c
2--- elinks-0.12pre5.orig/src/terminal/kbd.c 2009-07-07 14:23:17.000000000 +0200
3+++ elinks-0.12pre5/src/terminal/kbd.c 2011-06-06 02:29:58.000000000 +0200
4@@ -765,6 +765,11 @@ decode_terminal_escape_sequence(struct i
5 int v;
6 int el;
7
8+ if (itrm->in.queue.len == 2 && itrm->in.queue.data[1] == ASCII_ESC) {
9+ kbd.key = KBD_ESC;
10+ set_kbd_interlink_event(ev, kbd.key, kbd.modifier);
11+ return 2;
12+ }
13 if (itrm->in.queue.len < 3) return -1;
14
15 if (itrm->in.queue.data[2] == '[') {
16@@ -1108,8 +1113,7 @@ process_queue(struct itrm *itrm)
17 * beginning of e.g. ESC ESC 0x5B 0x41,
18 * which we should parse as Esc Up. */
19 if (itrm->in.queue.len < 3) {
20- /* Need more data to figure it out. */
21- el = -1;
22+ el = decode_terminal_escape_sequence(itrm, &ev);
23 } else if (itrm->in.queue.data[2] == 0x5B
24 || itrm->in.queue.data[2] == 0x4F) {
25 /* The first ESC appears to be followed
This page took 0.022736 seconds and 4 git commands to generate.