Weird behavior after changing cursor shape in vim #7101

Open
opened 2026-01-31 00:55:05 +00:00 by claunia · 0 comments
Owner

Originally created by @moetayuko on GitHub (Mar 23, 2020).

Environment

Windows build number: 10.0.18363.0
Windows Terminal version (if applicable): 0.10.761.0

Steps to reproduce

  1. Launch vim from either WSL or SSH of a Linux host
  2. Set cursor shape options: blinking block in normal mode, blinking vertical bar in insert mode
let &t_SI .= "\<Esc>[5 q"
let &t_EI .= "\<Esc>[0 q"

The shape does change as what we expect, but I observed weird behaviors after that.

Expected behavior

  1. When exiting insert mode, i.e. press i then <ESC>, the cursor stays at where it was if I didn't move it.
  2. When exiting insert mode, the cursor shape should change as soon as <ESC> pressed.
  3. Restore the default shape after exiting vim

Actual behavior

  1. Press i then <ESC>, the cursor moves ahead one character.
  2. The shape didn't change until the next blink.
  3. The cursor stays like a block after exiting.
Originally created by @moetayuko on GitHub (Mar 23, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: 10.0.18363.0 Windows Terminal version (if applicable): 0.10.761.0 ``` # Steps to reproduce <!-- A description of how to trigger this bug. --> 1. Launch vim from either WSL or SSH of a Linux host 2. Set cursor shape options: *blinking block* in normal mode, *blinking vertical bar* in insert mode ```vim let &t_SI .= "\<Esc>[5 q" let &t_EI .= "\<Esc>[0 q" ``` The shape does change as what we expect, but I observed weird behaviors after that. # Expected behavior <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> 1. When exiting insert mode, i.e. press *i* then *\<ESC>*, the cursor stays at where it was if I didn't move it. 2. When exiting insert mode, the cursor shape should change as soon as *\<ESC>* pressed. 3. Restore the default shape after exiting vim # Actual behavior <!-- What's actually happening? --> 1. Press *i* then *\<ESC>*, the cursor moves ahead one character. 2. The shape didn't change until the next blink. 3. The cursor stays like a *block* after exiting.
claunia added the Resolution-By-DesignNeeds-Tag-Fix labels 2026-01-31 00:55:05 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7101