mirror of
https://github.com/tmux/tmux.git
synced 2025-01-07 08:18:48 +00:00
Instead of always setting the extended flag, set it only when searching.
Allows send-keys to work. From Aaron Jensen.
This commit is contained in:
parent
2d08235987
commit
9614f51560
@ -431,7 +431,7 @@ input_key_write(const char *from, struct bufferevent *bev, const char *data,
|
|||||||
int
|
int
|
||||||
input_key(struct screen *s, struct bufferevent *bev, key_code key)
|
input_key(struct screen *s, struct bufferevent *bev, key_code key)
|
||||||
{
|
{
|
||||||
struct input_key_entry *ike;
|
struct input_key_entry *ike = NULL;
|
||||||
key_code justkey, newkey, outkey, modifiers;
|
key_code justkey, newkey, outkey, modifiers;
|
||||||
struct utf8_data ud;
|
struct utf8_data ud;
|
||||||
char tmp[64], modifier;
|
char tmp[64], modifier;
|
||||||
@ -483,9 +483,10 @@ input_key(struct screen *s, struct bufferevent *bev, key_code key)
|
|||||||
key &= ~KEYC_KEYPAD;
|
key &= ~KEYC_KEYPAD;
|
||||||
if (~s->mode & MODE_KCURSOR)
|
if (~s->mode & MODE_KCURSOR)
|
||||||
key &= ~KEYC_CURSOR;
|
key &= ~KEYC_CURSOR;
|
||||||
if (~s->mode & MODE_KEXTENDED)
|
if (s->mode & MODE_KEXTENDED)
|
||||||
key &= ~KEYC_EXTENDED;
|
ike = input_key_get(key|KEYC_EXTENDED);
|
||||||
ike = input_key_get(key);
|
if (ike == NULL)
|
||||||
|
ike = input_key_get(key);
|
||||||
if (ike == NULL && (key & KEYC_META) && (~key & KEYC_IMPLIED_META))
|
if (ike == NULL && (key & KEYC_META) && (~key & KEYC_IMPLIED_META))
|
||||||
ike = input_key_get(key & ~KEYC_META);
|
ike = input_key_get(key & ~KEYC_META);
|
||||||
if (ike == NULL && (key & KEYC_CURSOR))
|
if (ike == NULL && (key & KEYC_CURSOR))
|
||||||
|
@ -210,7 +210,7 @@ static const struct tty_default_key_raw tty_default_raw_keys[] = {
|
|||||||
{ "\033[201~", KEYC_PASTE_END },
|
{ "\033[201~", KEYC_PASTE_END },
|
||||||
|
|
||||||
/* Extended keys. */
|
/* Extended keys. */
|
||||||
{ "\033[1;5Z", '\011'|KEYC_CTRL|KEYC_SHIFT|KEYC_EXTENDED },
|
{ "\033[1;5Z", '\011'|KEYC_CTRL|KEYC_SHIFT },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Default xterm keys. */
|
/* Default xterm keys. */
|
||||||
@ -977,7 +977,7 @@ tty_keys_extended_key(struct tty *tty, const char *buf, size_t len,
|
|||||||
log_debug("%s: extended key %.*s is %llx (%s)", c->name,
|
log_debug("%s: extended key %.*s is %llx (%s)", c->name,
|
||||||
(int)*size, buf, nkey, key_string_lookup_key(nkey, 1));
|
(int)*size, buf, nkey, key_string_lookup_key(nkey, 1));
|
||||||
}
|
}
|
||||||
*key = nkey|KEYC_EXTENDED;
|
*key = nkey;
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user