1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-28 07:55:03 +03:00

disable csi-u sequences by default

I keep holding shift while pressing space and seeing stuff get
undone in vim.  Super annoying.  I didn't see a good way to
teach applications about this via terminfo, so this is off
by default for now.

refs: https://github.com/wez/wezterm/issues/63
This commit is contained in:
Wez Furlong 2019-11-23 15:04:54 -08:00
parent f3f61b47dc
commit d778d8b130

View File

@ -862,7 +862,12 @@ impl TerminalState {
// TODO: also respect self.application_keypad
fn csi_u_encode(buf: &mut String, c: char, mods: KeyModifiers) -> Result<(), Error> {
write!(buf, "\x1b[{};{}u", c as u32, 1 + encode_modifiers(mods))?;
// FIXME: provide an option to enable this, because it is super annoying
// in vim when accidentally pressing shift-space and it emits a sequence
// that undoes some number of commands
if false {
write!(buf, "\x1b[{};{}u", c as u32, 1 + encode_modifiers(mods))?;
}
Ok(())
}