1

I'm trying to set up my Linux console - the bare TTY terminal without X. I tried to capture this problem with asciinema but interestingly, it didn't show up there, So I captured it with my own camera, here is a link to the video.

It doesn't appear in [n]vim only, It is completely random and it appears sometimes on the command line as well. I'm pretty sure it has nothing to do with the font. Has anyone ever encountered such a strange behavior before?

Edit:

more info: I'm using ArchLinux and I think there was a problem with the way I installed the OS. In the past, I made a terrible mistake which deleted almost all files in /usr/. Afterwards, I decided I don't need to reinstall the filesystem For example and I only need to reinstall the gnu-core programs and the kernel with pacstrap. This problem appeared after that.

Troubleshooting:

I tried reset and it doesn't help. I tried LC_ALL=en_US.UTF-8 nvim test.txt and LC_ALL=C nvim test.txt in order to see if it's related to Locale settinga as well and it doesn't help either.

  • Most locale data would be under /usr/share, while console fonts likely under /etc. If you have a comparable Arch machine, using it as a model for repairing the broken machine would be less drastic than reinstalling (keeping in mind that some installers prefer to format your disk). – Thomas Dickey May 15 '17 at 22:48
3

A clue may be found in the upper-right-corner characters which are at the end of the lines. Linux console has partial support for the VT100 line-drawing escapes (shift-in/shift-out). If your locale is not set properly (making vim confused about what bytes comprise valid characters), and for instance if you've cat'd some binary file to the terminal (and left it in alternate-character set mode...), you could get some odd behavior like that.

Assuming that the terminal environment variable is set properly, e.g.,

export TERM=linux

the reset command is supposed to fix the alternate character set issue (but will not help with locale or the terminal's actual encoding).

0

O.K, here is why the problem occurs:

It's because Neovim provides the guicursor option which should be set only when using a graphical terminal inside X11 that supports it. In a bare TERM=linux tty, using the option is not supported.

I'd managed to isolate this problem when I launched Vim instead of Neovim. and because Vim doesn't provide this option I didn't experience it. What makes it hard to isolate is the fact that it continues even after you exit Neovim so it made me think this a general problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.