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
neovim errors when using mintty #1239
Comments
Is that a cygwin build or a native version of neovim? Sounds like some interference with ConPTY support for native Windows applications, which got reportedly improved in Windows 11. |
Could you provide exact steps to reproduce the issue? Please explain it like teaching a toddler 👶 Also, does this issue happen with Windows Terminal? It is possible to use msys2/mingw-w64 environment in Windows Terminal using the steps from here https://www.msys2.org/docs/terminals/ |
@mintty I think it's a native version of neovim given that I installed it on msys2. @Biswa96 I ran neovim on msys2 in Windows Terminal, and neither of the issues happen there. It seems like mintty is the only culprit so far. To reproduce these issues, first install msys2 if you don't have it already via the instructions here: https://www.msys2.org/
Run neovim with this configuration via |
I get no underlining at all. Maybe there's some plugin missing? |
Also nvim does not show line numbers, nor the vertical shadow line, nor blue background in the bottom line. |
Update nvim from 0.9.2 to 0.9.4 - no underlining here. |
client-c.txt |
Still no underline. Also still a mismatch of configuration as I don't see line numbers and indentation is 8 unlike in your screenshot. So maybe there's some configuration to be aligned for a complete retest scenario. |
Sorry, I think I missed another environment variable when trying to set up the example. Try Compare your results to my later screenshot in the follow-up comment, which also has 8-space indentations and no line numbers. I tried it in the MINGW64 environment, and I still get the underlining errors. |
Or simply VIMINIT="source .vimrfc" ..., anyway: |
I've extracted a significant part of terminal output from the log. Controls are not as weird as I thought, but nvim sets underline mode at the end of a line, then proceeds with the next line, indenting spaces and a brace, as can be seen in the attached log (output with
|
Just for my understanding, what makes Windows Terminal and cmd different from mintty/xterm in this case? I haven't tried xterm, but out of the remaining three, mintty was the only one to have this bug. This was the reason I thought it would be a bug on mintty's end. In fact, I actually did create an issue (neovim/neovim#25609) in the neovim repo before this, but it was closed and they directed me here. Aside from the underlining bug, what about the terminal clearing bug? Were you able to reproduce that? |
About underlining, I seem to have misinterpreted the issue; I was not aware that the current cursor line is supposed to get underlined completely. So let's take a fresh look: Case 1: moving the cursor down, only one word (e.g. "while") is underlined. Output looks like this.
Case 2: move cursor up
Observation: the whole line is embedded in SGR 4 (underline) and SGR 24 (clear underline) which seems to be nvim's assumption for the line, but right after the SGR 4 all attributes are already cleared again with SGR 0. Case 3: exit nvim |
I have this same bug! We're not alone in this crazy world anymore 😭 Additionally, I have issues using CTRL-i, CTRL-o in neovim. Steps to reproduce the Terminal Clearing bug and the CTLR-i, CTRL-o bug: Have Windows 10 |
Please provide a new and precise description. |
Please do the following: |
Here is the log.txt generated. |
The screen is cleared by a screenful of clear-to-end-of-line sequences (ESC[K). I assume your vim version is a Windows build, so it uses the Windows console API, which is transformed into ANSI sequences by the ConPTY layer. That layer is not involved if you run native Windows applications in native Windows console terminals. Also it is reported to be buggy in Windows 10. |
I'm only suffering from the ctrl-i ctrl-o issue on both windows 10 and windows 11, did you find a solution to this @Fishervjacob? |
I did but my solution was switching to Alacritty. I was not able to find a solution within mintty :( |
Please run |
Just dropping in to say I also have this bug. Unfortunately there is no Cygwin package for neovim, and I'm not daring enough to try to get that built as Windows is not my forte. If anyone reads this and is interested in building neovim for Cygwin/MSYS look here for some more info. However those binaries are over 5 years old :/ |
I've run into some bugs when using neovim on mintty (msys2 on Windows 10). The first is that my terminal is "cleared" after running and exiting neovim:
The previous terminal commands are erased and the prompt starts on the next line after them. In contrast, vim and other full-screen CLI apps work as expected after exiting and don't clear my terminal output. This behavior is also the same on my Windows 11 machine.
Another bug is that I enabled underlining in neovim, but it only underlines the portion of the line with text, rather than the whole line.
However, this only occurs on my Windows 10 machine. On my Windows 11 machine with the same setup, the underline works as expected.
The text was updated successfully, but these errors were encountered: