cursor shape wrong with nvim #21738

Closed
opened 2026-01-31 07:53:34 +00:00 by claunia · 4 comments
Owner

Originally created by @zgpio on GitHub (May 18, 2024).

Windows Terminal version

1.21.1272.0

Windows build number

No response

Other Software

NVIM v0.10.0-dev-3117+g4e5c633ed

Steps to reproduce

a.vim

let &g:statusline="%#Visual#%{'['.winnr().']'}%#Normal#
      \ %{(&previewwindow?'[preview] ':'').expand('%:p:~:.')}%m
      \ %=%{(winnr('$')==1 || winnr('#')!=winnr()) ? '['.(&filetype!=''?&filetype.',':'').(&fenc!=''?&fenc:&enc).','.&ff.']' : ''}
      \ %{printf('%'.(len(line('$'))+2).'d/%d',line('.'),line('$'))}"

" If you annotate this line, there won't be this problem
set noshowmode

  1. nvim -u a.vim
  2. press i and then press <esc>
  3. you can see the cursor did not turn into a square after press <esc>

Expected Behavior

No response

Actual Behavior

in reproduce

Originally created by @zgpio on GitHub (May 18, 2024). ### Windows Terminal version 1.21.1272.0 ### Windows build number _No response_ ### Other Software NVIM v0.10.0-dev-3117+g4e5c633ed ### Steps to reproduce a.vim ```vim let &g:statusline="%#Visual#%{'['.winnr().']'}%#Normal# \ %{(&previewwindow?'[preview] ':'').expand('%:p:~:.')}%m \ %=%{(winnr('$')==1 || winnr('#')!=winnr()) ? '['.(&filetype!=''?&filetype.',':'').(&fenc!=''?&fenc:&enc).','.&ff.']' : ''} \ %{printf('%'.(len(line('$'))+2).'d/%d',line('.'),line('$'))}" " If you annotate this line, there won't be this problem set noshowmode ``` 1. nvim -u a.vim 2. press `i` and then press `<esc>` 3. you can see the cursor did not turn into a square after press `<esc>` ### Expected Behavior _No response_ ### Actual Behavior in reproduce
claunia added the Issue-BugNeeds-Tag-Fix labels 2026-01-31 07:53:34 +00:00
Author
Owner

@github-actions[bot] commented on GitHub (May 18, 2024):

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@github-actions[bot] commented on GitHub (May 18, 2024): Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! ### Closed similar issues: - [cursor can't restore its shape after leaving Vim and WSL (#13420)](https://github.com/microsoft/terminal/issues/13420), similarity score: 0.79 - [Can't change back to default cursor shape after enter and exit out of neovim. (#5904)](https://github.com/microsoft/terminal/issues/5904), similarity score: 0.78 - [Weird behavior after changing cursor shape in vim (#5084)](https://github.com/microsoft/terminal/issues/5084), similarity score: 0.77 - [Vim cursror is always set to the one of Windows Terminal (#11112)](https://github.com/microsoft/terminal/issues/11112), similarity score: 0.76 - [Text box cursor after NVim (#13921)](https://github.com/microsoft/terminal/issues/13921), similarity score: 0.75 > Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Author
Owner

@carlos-zamora commented on GitHub (Jul 3, 2024):

Thanks for filing. We're going to mark this as a /dup of https://github.com/neovim/neovim/issues/6005

@carlos-zamora commented on GitHub (Jul 3, 2024): Thanks for filing. We're going to mark this as a /dup of https://github.com/neovim/neovim/issues/6005
Author
Owner

@zgpio commented on GitHub (Jul 5, 2024):

It work ok on terminal 1.20.11381.0 ,but not on 1.21.1272.0,so it is regression

@zgpio commented on GitHub (Jul 5, 2024): It work ok on terminal 1.20.11381.0 ,but not on 1.21.1272.0,so it is regression
Author
Owner

@lhecker commented on GitHub (Jul 7, 2024):

You may have hit #17212. Can you try updating Windows Terminal Preview? The latest version is here: https://github.com/microsoft/terminal/releases/tag/v1.21.1772.0

I just tested it on that version, and it worked for me. (This may also explain why we couldn't reproduce the issue. At least I didn't attempt testing the older version that you reported.)

@lhecker commented on GitHub (Jul 7, 2024): You may have hit #17212. Can you try updating Windows Terminal Preview? The latest version is here: https://github.com/microsoft/terminal/releases/tag/v1.21.1772.0 I just tested it on that version, and it worked for me. (This may also explain why we couldn't reproduce the issue. At least I didn't attempt testing the older version that you reported.)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21738