mirror of
https://github.com/neovim/neovim.git
synced 2025-11-15 23:01:24 +00:00
fix(tui): wrong default input key encoding (#36440)
Don't override the default key encoding in tinput_init(), now that it's called after terminfo_start().
This commit is contained in:
@@ -129,7 +129,6 @@ void tinput_init(TermInput *input, Loop *loop, TerminfoEntry *ti)
|
|||||||
input->loop = loop;
|
input->loop = loop;
|
||||||
input->paste = 0;
|
input->paste = 0;
|
||||||
input->in_fd = STDIN_FILENO;
|
input->in_fd = STDIN_FILENO;
|
||||||
input->key_encoding = kKeyEncodingLegacy;
|
|
||||||
input->ttimeout = (bool)p_ttimeout;
|
input->ttimeout = (bool)p_ttimeout;
|
||||||
input->ttimeoutlen = p_ttm;
|
input->ttimeoutlen = p_ttm;
|
||||||
|
|
||||||
|
|||||||
@@ -2391,7 +2391,11 @@ static void augment_terminfo(TUIData *tui, const char *term, int vte_version, in
|
|||||||
tui_enable_extended_underline(tui);
|
tui_enable_extended_underline(tui);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!kitty && (vte_version == 0 || vte_version >= 5400)) {
|
if (kitty || (vte_version != 0 && vte_version < 5400)) {
|
||||||
|
// Never use modifyOtherKeys in kitty if kitty keyboard protocol query fails.
|
||||||
|
// Also don't emit the sequence to enable modifyOtherKeys in old VTE versions.
|
||||||
|
tui->input.key_encoding = kKeyEncodingLegacy;
|
||||||
|
} else {
|
||||||
// Fallback to Xterm's modifyOtherKeys if terminal does not support the
|
// Fallback to Xterm's modifyOtherKeys if terminal does not support the
|
||||||
// Kitty keyboard protocol. We don't actually enable the key encoding here
|
// Kitty keyboard protocol. We don't actually enable the key encoding here
|
||||||
// though: it won't be enabled until the terminal responds to our query for
|
// though: it won't be enabled until the terminal responds to our query for
|
||||||
|
|||||||
Reference in New Issue
Block a user