mirror of
https://github.com/tmux/tmux.git
synced 2024-12-26 03:19:16 +00:00
Preserve modifiers on backspace.
This commit is contained in:
parent
102f34090d
commit
5c3cf2f08b
10
input-keys.c
10
input-keys.c
@ -588,9 +588,10 @@ input_key(struct screen *s, struct bufferevent *bev, key_code key)
|
|||||||
newkey = options_get_number(global_options, "backspace");
|
newkey = options_get_number(global_options, "backspace");
|
||||||
if (newkey == KEYC_BSPACE)
|
if (newkey == KEYC_BSPACE)
|
||||||
newkey = '\b';
|
newkey = '\b';
|
||||||
log_debug("%s: key 0x%llx is backspace -> 0x%llx", __func__,
|
newkey |= (key & (KEYC_MASK_FLAGS|KEYC_MASK_MODIFIERS));
|
||||||
key, newkey|(key & KEYC_MASK_FLAGS));
|
log_debug("%s: key 0x%llx is backspace -> 0x%llx", __func__, key,
|
||||||
key = newkey|(key & KEYC_MASK_FLAGS);
|
newkey);
|
||||||
|
key = newkey;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Is this backtab? */
|
/* Is this backtab? */
|
||||||
@ -645,8 +646,7 @@ input_key(struct screen *s, struct bufferevent *bev, key_code key)
|
|||||||
if (ike != NULL) {
|
if (ike != NULL) {
|
||||||
log_debug("%s: found key 0x%llx: \"%s\"", __func__, key,
|
log_debug("%s: found key 0x%llx: \"%s\"", __func__, key,
|
||||||
ike->data);
|
ike->data);
|
||||||
if ((key == KEYC_PASTE_START || key == KEYC_PASTE_END) &&
|
if (KEYC_IS_PASTE(key) && (~s->mode & MODE_BRACKETPASTE))
|
||||||
(~s->mode & MODE_BRACKETPASTE))
|
|
||||||
return (0);
|
return (0);
|
||||||
if ((key & KEYC_META) && (~key & KEYC_IMPLIED_META))
|
if ((key & KEYC_META) && (~key & KEYC_IMPLIED_META))
|
||||||
input_key_write(__func__, bev, "\033", 1);
|
input_key_write(__func__, bev, "\033", 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user