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

Unexpected character after update #5990

Closed
dikiaap opened this issue Jan 22, 2017 · 26 comments
Closed

Unexpected character after update #5990

dikiaap opened this issue Jan 22, 2017 · 26 comments
Labels
compatibility compatibility with Vim or older Neovim tui
Milestone

Comments

@dikiaap
Copy link

dikiaap commented Jan 22, 2017

  • nvm --version: NVIM 0.2.0-dev
  • VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 18 2017 12:42:32)
  • Operating system/version: Ubuntu
  • Terminal name/version: lxterminal, tested in tty too
  • $TERM: xterm-256color

I was updating neovim and this character suddenly appear. Before updating, this isn't happen.
Tested in vim, all is fine.

screenshot from 2017-01-22 10-01-13
screenshot from 2017-01-22 10-01-00

@jamessan
Copy link
Member

That's probably due to ef753a7. If you put let $NVIM_TUI_ENABLE_CURSOR_SHAPE = 0 in your init.vim, does that fix the problem?

@justinmk
Copy link
Member

Yes, your terminal should ignore unknown sequences.

@justinmk
Copy link
Member

@dikiaap What does echo $VTE_VERSION report? Also if you can find out what version of libvte your system uses, please include that.

@dikiaap
Copy link
Author

dikiaap commented Jan 22, 2017

@justinmk Already fixed this. I did echo $VTE_VERSION command and there is nothing results

@dikiaap
Copy link
Author

dikiaap commented Jan 22, 2017

libvte-2.19-0 Version 0.42.5-1ubuntu1
libvte9 Version 1:0.28.2-5ubuntu3

@ghost
Copy link

ghost commented Jan 22, 2017

Just wondering, why has this been marked closed? Is let $NVIM_TUI_ENABLE_CURSOR_SHAPE = 0 the final solution? Respectfully, it seems to me like it would be good to not have user-configuration be the fix.

@jszakmeister
Copy link
Contributor

@kantsdog It's not that simple. Terminals have all kinds of brokenness, and this is one of them. Many support changing the cursor shape, but do it in one of two different ways. And while there are ways to query whether or not a terminal supports the feature, most do not implement the mechanism. So we're stuck with user configuration until the situation improves. :-(

@justinmk
Copy link
Member

justinmk commented Jan 22, 2017

I made a change that enables cursor shape by default. It looks like the state of terminals having even basic fallback behavior is worse than expected, so I'll switch it back to opt-in instead of opt-out.

I guess querying will be the only way this can be automatically enabled, because of all the broken terminals out there.

(I'm grateful for the feedback from users giving us early warning about this)

@justinmk justinmk added tui compatibility compatibility with Vim or older Neovim labels Jan 22, 2017
@justinmk justinmk reopened this Jan 22, 2017
@justinmk justinmk added this to the 0.2 milestone Jan 22, 2017
@ghost
Copy link

ghost commented Jan 23, 2017

@justinmk Thanks for changing it back to the default. Had I not found the solution in this thread, Neovim would have become unworkable for me and people in my situation, so switching it back to opt-in seems like a good call from my perspective.

@jszakmeister Thanks for the helpful and informative explanation of terminals in all their brokenness.

@prlz77
Copy link

prlz77 commented Feb 20, 2017

Thank you very much. I have also realized that unsetting TERM when calling nvim does also "fix" this issue.

@jamessan
Copy link
Member

@prlz77 Unsetting TERM is a very heavy-handed approach to "fix" this. Just add let $NVIM_TUI_ENABLE_CURSOR_SHAPE = 0 in your init.vim

@prlz77
Copy link

prlz77 commented Feb 20, 2017

@jamessan I changed it when I discovered this thread. Thank you anyway!

@frostybee
Copy link

@jamessan It worked as you suggested. Thank you!.

justinmk added a commit to justinmk/neovim that referenced this issue Apr 4, 2017
User can still set guicursor explicitly in init.vim.

Closes neovim#5990
Closes neovim#6403
justinmk added a commit to justinmk/neovim that referenced this issue Apr 4, 2017
User can still set guicursor explicitly in init.vim.

Closes neovim#5990
Closes neovim#6403
@prlz77
Copy link

prlz77 commented Apr 6, 2017

The problem is back after the last update.

I am using terminator and TERM=xterm-256color. My nvim version is v0.2.0-dev.

It persists even with $NVIM_TUI_ENABLE_CURSOR_SHAPE = 0.

nvim

@justinmk
Copy link
Member

justinmk commented Apr 6, 2017

Please see https://github.com/neovim/neovim/wiki/Following-HEAD

@prlz77
Copy link

prlz77 commented Apr 6, 2017

Thank you, the problem persisted even with set guicursor= because a plug-in was overriding it.

I solved it with export VTE_VERSION="100" (https://github.com/neovim/neovim/wiki/FAQ#how-can-i-change-the-cursor-shape-in-the-terminal)

@tarciozemel
Copy link

I'm still having this issue of unexpected weird chars every time I type some command or change for Insert Mode.

Sadly, I've already tried all the solutions shown here and nothing.

captura de tela de 2017-08-09 14 32 39

All this madness it's just ":x"...

  • Ubuntu 14.04.5 LTS
  • Terminal Guake 0.8.10
  • NVIM v0.2.1-dev

@justinmk
Copy link
Member

justinmk commented Aug 9, 2017

@tarciozemel #6997 should address your issue when it's merged soon.

@oppsig
Copy link

oppsig commented Nov 18, 2017

Also solved my problem with
export VTE_VERSION="100"

@ZelphirKaltstahl
Copy link

Question about this issue: Is it likely to be fixed in time, without users having to specify some variable like VTE_VERSION?

I've updated my NeoVim time and time again hoping it would be fixed, but maybe I am waiting for naught and there is no way it's simply going to work without having to set some variable?

(What does VTE_VERSION even do? Will it break other in terminal stuff?)

@ydajwz123
Copy link

The similar situation only occurs when I use 'sudo'. If I use nvim normally, everythin is ok. But if I use nvim with 'sudo' , changing mode(such as 'inserting mode, command mode) comes with a unexpected char 'q' (only one character 'q'). Is this the same as the problem you've disscused above?

@teto
Copy link
Member

teto commented Jan 27, 2018

@ydajwz123 sudo changes your environment and the loaded config so it can be several things. You can :set guicursor= in the system config and overwrite it in your local one. See https://github.com/neovim/neovim/wiki/FAQ#nvim-shows-weird-symbols-2-q-when-changing-modes

@ydajwz123
Copy link

@teto thanks, now I have a better understanding of how it working.

FlakM added a commit to FlakM/dotfiles that referenced this issue Mar 1, 2018
@teto
Copy link
Member

teto commented May 12, 2018

@kabasakalis $NVIM_TUI_ENABLE_CURSOR_SHAPE got removed a year ago (bootom of https://github.com/neovim/neovim/wiki/Following-HEAD)

@kabasakalis
Copy link

@teto Right, I don't have time to follow the changelog. And I noticed you already mentioned guicursor in a comment above, so I am deleting my comment.

@jcarizza
Copy link

jcarizza commented Jul 27, 2018

I also have the problem on Terminator and tmux. I had set the VTE_VERSION on my init.vim and fixed the problem:

let $VTE_VERSION="100"

hposca pushed a commit to hposca/dotfiles that referenced this issue Aug 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility compatibility with Vim or older Neovim tui
Projects
None yet
Development

No branches or pull requests