kakoune: [BUG] does not work with wezterm
Version of Kakoune
v2021.08.28-Kakoune 2022.10.31
Reproducer
- Install WezTerm
- Install a version of kakoune after removal of ncurses
- Launch kakoune and press
:
followed by<tab>
and<s-tab>
Outcome
Notice that <s-tab>
does not cycle backward, but rather seems to reset the autocomplete state as if you have just pressed <tab>
.
Expectations
<s-tab>
should work correctly as expected.
Additional information
I’m running on macOS. I’ve verified that the issue does not occur with the default Terminal.app
. It also does not occur with older versions of kakoune that depend on ncurses (regardless of which terminal is used). I’m not intimately familiar with the way escape sequences are handled, but I verified that if I press <s-tab>
in wezterm
, I see the escape sequence <ESC>[Z
. I did this using showkey. This is the exact same sequence I see when using Terminal.app
, which is weird since the latest versions of kakoune work fine on that terminal.
I know vim has timeout
and ttimeout
for handling escape sequence timing. Is there a similar setting for kakoune that I need to investigate? Could there be a different issue going on?
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 1
- Comments: 16 (8 by maintainers)
For some reason, WezTerm decided to use
CSI ~
instead ofCSI u
as most terminal emulator do, Kakoune parser does not currently support that. Adding it should be easy, but I think it would be great to first understand why WezTerm decided to deviate from common practice, and if it introduces other differences.EDIT: looking at wezterm’s doc, it seems adding
enable_csi_u_key_encoding = true
in its config should do the trick.