diff options
author | 2017-01-25 14:36:08 +0000 | |
---|---|---|
committer | 2017-01-25 14:36:08 +0000 | |
commit | 77c6aa83a951b50987c0ad12cb41ed83d8e08d23 (patch) | |
tree | 1ee8a5dbec2628744bb85472da30d75aa192fc7c /usr.bin/tmux/input-keys.c | |
parent | If xterm-keys is on, use xterm(1) style keys for Home and End as well as (diff) | |
download | wireguard-openbsd-77c6aa83a951b50987c0ad12cb41ed83d8e08d23.tar.xz wireguard-openbsd-77c6aa83a951b50987c0ad12cb41ed83d8e08d23.zip |
Revert previous for now, it will break TERM=screen.
Diffstat (limited to 'usr.bin/tmux/input-keys.c')
-rw-r--r-- | usr.bin/tmux/input-keys.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/tmux/input-keys.c b/usr.bin/tmux/input-keys.c index 9c865597136..670840ca3a4 100644 --- a/usr.bin/tmux/input-keys.c +++ b/usr.bin/tmux/input-keys.c @@ -1,4 +1,4 @@ -/* $OpenBSD: input-keys.c,v 1.57 2017/01/25 14:24:54 nicm Exp $ */ +/* $OpenBSD: input-keys.c,v 1.58 2017/01/25 14:36:08 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -158,7 +158,6 @@ input_key(struct window_pane *wp, key_code key, struct mouse_event *m) char *out; key_code justkey; struct utf8_data ud; - int mode; log_debug("writing key 0x%llx (%s) to %%%u", key, key_string_lookup_key(key), wp->id); @@ -195,9 +194,8 @@ input_key(struct window_pane *wp, key_code key, struct mouse_event *m) * Then try to look this up as an xterm key, if the flag to output them * is set. */ - mode = wp->screen->mode; if (options_get_number(wp->window->options, "xterm-keys")) { - if ((out = xterm_keys_lookup(key, mode)) != NULL) { + if ((out = xterm_keys_lookup(key)) != NULL) { bufferevent_write(wp->event, out, strlen(out)); free(out); return; @@ -208,9 +206,11 @@ input_key(struct window_pane *wp, key_code key, struct mouse_event *m) for (i = 0; i < nitems(input_keys); i++) { ike = &input_keys[i]; - if ((ike->flags & INPUTKEY_KEYPAD) && (~mode & MODE_KKEYPAD)) + if ((ike->flags & INPUTKEY_KEYPAD) && + !(wp->screen->mode & MODE_KKEYPAD)) continue; - if ((ike->flags & INPUTKEY_CURSOR) && (~mode & MODE_KCURSOR)) + if ((ike->flags & INPUTKEY_CURSOR) && + !(wp->screen->mode & MODE_KCURSOR)) continue; if ((key & KEYC_ESCAPE) && (ike->key | KEYC_ESCAPE) == key) |