Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using insert mode in Vim while inside Wezterm does not change the cursor shape #1116

Closed
supercomputer1 opened this issue Sep 7, 2021 · 3 comments
Labels
bug Something isn't working Windows Issue applies to Microsoft Windows

Comments

@supercomputer1
Copy link

supercomputer1 commented Sep 7, 2021

What Operating System(s) are you seeing this problem on?

Windows

WezTerm version

20210814-124438-54e29167

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes

Describe the bug

When entering insert mode while inside Vim, I'm expecting the cursor to be shaped as a underline. However, the cursor shape will not change at all, thus staying as a solid block.

It would be helpful if there was some sort of visual indication on the cursor when entering insert mode.

To Reproduce

  1. Open a file in Vim
  2. Press i to enter insert mode
  3. The Vim cursor shape will still be a solid block

Configuration

No config.

Expected Behavior

When entering insert mode I expect the cursor to be shaped as a underline instead of a solid block.

Logs

No logs.

Anything else?

If this can be fixed by tweaking my vimrc I would be really grateful if someone could point me in the right direction. I've tried changing the cursor shapes "manually" by entering this into my vimrc:

let &t_SI = "\e[6 q"
let &t_EI = "\e[2 q"

But this does not work as expected.

@supercomputer1 supercomputer1 added the bug Something isn't working label Sep 7, 2021
@wez
Copy link
Owner

wez commented Sep 7, 2021

Which vim are you running? Win32 native, WSL, msys, cygwin?

The vimrc config you mentioned works on unix so this may actually be an issue with the windows PTY layer.

I don't have time to dig into this right at this moment, but I'd suggest starting with microsoft/terminal#8560 which is the first issue that sounds similar

@wez wez added the Windows Issue applies to Microsoft Windows label Sep 7, 2021
@supercomputer1
Copy link
Author

supercomputer1 commented Sep 8, 2021

Win32 native (version 8.2).

The suggested fix does work (in the MT link), or at least it changes the cursor shape. However it does leave behind a "ghost" j after pressing jk to escape insert mode. I'll see if I can find a fix for that..

Edit: A redraw inside Vim with the help of CTRL + L seems to remove the "ghost" j.

@wez wez closed this as completed Mar 30, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2023

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Windows Issue applies to Microsoft Windows
Projects
None yet
Development

No branches or pull requests

2 participants