Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Unexpected escape sequence error in vim mode #387

Open
cristiand391 opened this issue Oct 24, 2021 · 1 comment
Open

Unexpected escape sequence error in vim mode #387

cristiand391 opened this issue Oct 24, 2021 · 1 comment
Labels

Comments

@cristiand391
Copy link

I'm getting the error unexpected escape sequence from terminal when I press any key in vim mode using tmux 3.2a. Reproduced this bug on macOS native terminal, Alacritty, also on Xubuntu with xfce4-terminal and Alacritty (clean VM), no config file.
This only happens when the program runs inside of tmux.

Example:

  1. Make sure you are using at least tmux 3.2a: tmux -V
  2. Run tmux
  3. Clone cristiand391/survey-tmux-bug
  4. Run go build
  5. Run ./survey-tmux-bug
  6. Press Esc to enter vim mode
  7. Press any key

What operating system and terminal are you using?
macOS Big Sur, Xubuntu
Alacritty

An example that showcases the bug.
Left: Alacritty | Right macOS terminal
survey-tmux-bug-macos

What did you expect to see?
It should move the selector when I press j/k.

What did you see instead?
unexpected escape sequence

@amdprophet
Copy link

This also happens, outside of vim mode, when using key combinations for killing words, moving forwards / backwards by words, etc. E.g.:

Unexpected Escape Sequence: ['\x1b' '\u007f'] (delete one word backwards)
Unexpected Escape Sequence: ['\x1b' 'd'] (delete one word forwards)
Unexpected Escape Sequence: ['\x1b' 'b'] (move backward by one word)
Unexpected Escape Sequence: ['\x1b' 'f'] (move forward by one word)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants