microsoft / microsoft/terminal
Cursor shape keep changing
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
### Windows Terminal version
1.11.3741.0
### Windows build number
10.0.19042.1466
### Other Software
tmux 3.0a (inside WSL)
NVIM v0.7.0-dev
### Steps to reproduce
1. Create `~/.tmux.conf`:
```
set-option -sg status-interval 1
set -g status-right "%I:%M%S%P"
```
2. Enter tmux by typing `tmux`
3. Enter nvim inside tmux by typing `nvim`
4. Enter insert mode by typing `i`
### Expected Behavior
**The cursor should not be changing. I've tested it on other terminals and it behaves correctly.** Here is the recording of the terminal output and I've tested this on other terminal and didn't experience any cursor issue with it. However, it causes cursor issue on Windows Terminal.
```sh
scriptreplay --timing=timing.log script.log
```
[script.log](https://github.com/microsoft/terminal/files/7978682/script.log)
[timing.log](https://github.com/microsoft/terminal/files/7978685/timing.log)
### Actual Behavior
The cursor will keep changing randomly when the status line redraws. This does not happen on every frame but about half of the time.
https://user-images.githubusercontent.com/28508329/151974459-7e0ba6ec-ee66-476b-9893-c77a6ee318f5.mp4
The following is what gets repeatedly emitted to the console after following https://github.com/microsoft/terminal/wiki/Enabling-the-debug-tap
```
[0]␣0:nvim*␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣01:1936pm␛[H␛[?25h␛[m␛[2␣q␛[?12l␛[6␣q␛[?25l␛[30m␛[42m␛[45;1H[0]␣0:nvim*␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣01:1937pm␛[H␛[?25h␛[m␛[2␣q␛[?12l␛[6␣q␛[?25l␛[30m␛[42m␛[45;1H[0]␣0:nvim*␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣01:1938pm␛[H␛[?25h␛[m␛[2␣q␛[?12l␛[6␣q␛[?25l␛[30m␛[42m␛[45;1H[0]␣0:nvim*␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣01:1939pm␛[H␛[?25h␛[m␛[2␣q␛[?12l␛[6␣q␛[?25l␛[30m␛[42m␛[45;1H
```
Contributor guide
Research direction
Reproduce the issue in Windows Terminal with tmux 3.0a inside WSL and Neovim, using the supplied ~/.tmux.conf and the script.log/timing.log replay. Start with the debug-tap escape-sequence output, especially the cursor-shape and redraw sequences, and compare behavior with the other terminals mentioned. Done means the cursor remains stable while the tmux status line redraws.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100