skywind3000 / vim-terminal-help

Small changes make vim/nvim's internal terminal great again !!
MIT License
246 stars 32 forks source link

Random strings in buffer. #15

Open BlueDrink9 opened 4 years ago

BlueDrink9 commented 4 years ago

I get this random string in my buffer every time I start vim: 37=1b5b313b3246. I think there are also a bunch of jumps that happen if I open an existing buffer.

This doesn't happen in neovim, only normal vim.

Minimal reproduction:

let s:pluginPath = expand("$HOME") . "/.vim/plugins"
call plug#begin(s:pluginPath)
Plug 'skywind3000/vim-terminal-help'
call plug#end()
finish

Suprisingly, this doesn't happen if I use `vim -u NORC --cmd "set rtp+=$HOME/.vim/plugins/vim-terminal-help"

Arch, vim 8.2 in terminal. Doesn't seem to happen in gvim.

BlueDrink9 commented 4 years ago

@skywind3000 any thoughts on this?

BlueDrink9 commented 4 years ago

Terminal is kitty btw, TERM=xterm-kitty

BlueDrink9 commented 4 years ago

Commenting out this section of code fixes the issue. Specifically, the meta_code calls. I do not use the alt key in terminal ever. I think this should therefore be placed behind an option. I will submit a PR for this.

BlueDrink9 commented 4 years ago

Actually, I see there is already an undocumented option for this: g:terminal_skip_key_init. Setting this to 1 fixed my issue.

I will submit a PR anyway documenting this.