vim-devicons
vim-devicons copied to clipboard
DCS control codes
Why after adding vim-devicons to vim with enabled vim-airline, vim start sending DCS control codes(https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Device-Control-functions) to the terminal without it's handling?
Required Info
- [x] I have searched the issues for my issue and found nothing related and/or helpful
- [x] I have read or at least glanced at the FAQ
- [x] I have read or at least glanced at the Wiki
- [x] VimDevIcons is the last loaded vim plugin? Yes
- [x] What version of vim are you using? VIM - Vi IMproved 8.1
- [x] What version of vim-devicons are you using? 0.11.0
- [x] Are you using vim from the terminal or a GUI vim? terminal, Kitty
- [x] Are you using Mac, Linux or Windows? Linux
Optional Info
- [x] Provide screenshots where appropriate
Screenshot from Kitty terminal:
This terminal control codes(DCS) are iniciated and unhandled by vim-devicons. To reproduce a bug launch it like
vim test.c
, with file who has extension, known to vim-devicons
@ecx if you disable vim-devicons does the problem go away or persist?
@ryanoasis if i disable vim-devicons problem is goes away
@ecx Hi. Would you please tell us the minimal vimrc?
This is the most minimal .vimrc I can get that still reproduces it:
scriptencoding utf-8
if filereadable(expand('$VIMRUNTIME/defaults.vim'))
unlet! g:skip_defaults_vim
source $VIMRUNTIME/defaults.vim
endif
packadd minpac
call minpac#init()
call minpac#add('ryanoasis/vim-devicons')
call minpac#add('vim-airline/vim-airline')
There was a lot of analysis done in the issue I just linked.
I've also noticed that it only happens if both of these are set to 1, as they are by default:
let g:webdevicons_enable_airline_statusline=1
let g:webdevicons_enable_airline_statusline_fileformat_symbols=1
As mentioned in the linked issue, this is only reproducible in certain terminals, one of which is Kitty.
From trying some of the suggestions listed here:
https://github.com/vim-airline/vim-airline/issues/393
It turns out that either of the following gets rid of the problem:
set t_RV=
set term=builtin_xterm
It's also fairly obvious to me that this is a bug in vim's terminal handling (after all, it's vim that's inserting the escape sequence), and not a bug in devicons, airline or Kitty (which, according to its maintainer, is just less error-tolerant). I have not yet tested to see if it also happens in neovim.
I am using Tilix terminal, the same problem occurs.
Can this issue be reproduced after updating Vim to the latest version?
@kazukazuinaina still reproduceable on VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 14 2020 23:43:46)
, I'm on ppa:jonathonf/vim it's enough fresh
I'd be more interested in whether we can extract that code that triggers this, so that we can produce a .vimrc file that can reproduce it without plugins. That would allow us to enter an issue with vim.
That unfortunately is beyond my skills (I've tried).
I'm using Fedora 33's vim ('gvim -v') in Fedora 33's Kitty, and I'm not currently seeing this...
@duganchen Sorry for the late reply. Thanks for your report. Are you saying that this is not a vim-devicons problem? Could we close this problem?
I honestly wouldn't know. I've fully switched from vim to VSCode.
As @Goku-San mentioned on https://github.com/ryanoasis/vim-devicons/issues/359 adding set t_RV=
at the end of .vimrc fixes the issue.