Weired issue in nested terminal inside vim
eyalz800 opened this issue · 0 comments
Description:
The string "2 q" appears on the screen when exiting insert mode in vim (via escape), which runs inside a terminal that was opened in vim, which runs inside tmux.
This may sound like an extreme edge case, however, it is pretty common in my workflow to have vim running inside tmux, and then have a terminal inside vim to perform git commit (which opens vim).
This also happens with plugins that use terminal such as lazygit, etc, because they launch vim inside for committing.
If it helps, I thought initially this was a bug with vim, but it happens only when your plugin is loaded, the bug was introduced between v8.2.0797 and v8.2.0798, when the plugin is used, by the following commit vim/vim@be593bf
Reproduction steps:
Detailed steps to reproduce the behavior:
- Compile & Install vim v8.2.0798 (The first revision where the bug was introduced), features huge.
- Open tmux session (tmux version 3.1b)
- Start vim inside (with plugin installed).
- Open a terminal inside vim (:terminal)
- Launch vim inside the terminal.
- Go to insert mode and hit , "2 q" string appears after the cursor.
- Go into insert mode, "6 q" string appears next to the 'insert' notice in the status bar.
Expected behavior
Behave normally, no strings should be printed on the screen when pressing escape or entering insert mode.
Screenshots:
See here image of the behavior:
Here in insert mode also look at the "6 q" below:
Environment:
- Vim version v8.2.0798
- OS: Ubuntu 18.04 and Windows 10 WSL 2 (Ubuntu 18.04)
- Terminal: Gnome terminal and Windows terminal app.