-
Notifications
You must be signed in to change notification settings - Fork 296
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
Latest commit seems to be causing stray text to appear on the first line #619
Comments
That's weird. It almost looks like an escape sequence. And this happens when you open a file but before you do anything in the buffer? Does it always happen? Please could you confirm the SHA of the latest commit you have installed? Also, please could you enable logging with |
Can you reproduce this with vim-gitgutter as your only plugin? |
Hi, sorry for the late reply. Attached is the content of the log. I just tried various combinations of plugins and narrowed it down to one incompatibility: Fastfold. Which is... weird. Currently install SHA is a765079. Many thanks |
Addendum: I can't really reproduce the bug consistently, since it appears only for certain files. Also in all probability it's not inherently caused by vim-gitgutter. So I'll probably close this issue soon. |
Thanks for the log file; sometimes weird diff output can explain what's wrong, but here everything looks good. Thanks for confirming the SHA too. There have been a few occasions in the past where a plugin manager hasn't actually updated a user's gitgutter installation, even though it looks like it has. I can't see why Fastfold would conflict with gitgutter. As you say, it's weird. |
For me, gitgutter seems to conflict with tpope/vim-sleuth (these are the only two plugins needed to trigger the bug). The gitgutter.log after opening and closing single file:
The garbled line goes away when I repaint the screen with ^L. I'm currently on gitgutter dc3c0dc, vim 8.1, and git 2.20.1. |
I installed vim-sleuth and opened and edited my vimrc; I can't reproduce the problem. It looks like some kind of terminal rendering glitch to me. I don't know how to debug this any further. |
I can indeed reproduce the problem only on libvte-based terminals (gnome-terminal, xfce4-terminal, lxterminal and friends). There are no glitches on f.ex. xterm and urxvt. @raphael-vock, @airblade: would you be so kind and verify that hypothesis on your side? |
Are you using Vim or Neovim? Might be worth checking with the other then. |
Yup, it's working fine for me with nvim v0.3.4. |
Ran into this issue as well. It happens only in terminal Vim and only in certain terminal emulators. xterm works fine but kitty does not. GVim and Neovim seem unaffected. The bug first appears in 064a3d6. Reverting to previous commit 50932df fixes it for me. I've managed to reproduce the issue with minimal vimrc including only vim-gitgutter:
The result of opening this vimrc itself in vim: If I remove |
@kodemeister Thanks for the information. The main change 064a3d6 made was to remove a I have the impression that Vim's colorscheme implementation is quite quirky, and I assume the terminal interface stuff must be fiddly too. I'm surprised that strange rendering bugs don't happen more often – but I can't see why that commit would introduce such a bug. |
Hi, |
@airblade Yeah, this is strange. I also found that:
I suspect the async diff --git a/autoload/gitgutter/utility.vim b/autoload/gitgutter/utility.vim
index 35ff542..3f533ba 100644
--- a/autoload/gitgutter/utility.vim
+++ b/autoload/gitgutter/utility.vim
@@ -147,7 +147,7 @@ function! gitgutter#utility#set_repo_path(bufnr, continuation) abort
call gitgutter#utility#setbufvar(a:bufnr, 'path', -1)
let cmd = gitgutter#utility#cd_cmd(a:bufnr, g:gitgutter_git_executable.' '.g:gitgutter_git_args.' ls-files --error-unmatch --full-name -z -- '.gitgutter#utility#shellescape(s:filename(a:bufnr)))
- if g:gitgutter_async && gitgutter#async#available()
+ if g:gitgutter_async && gitgutter#async#available() && !has('vim_starting')
let handler = copy(s:set_path_handler)
let handler.continuation = a:continuation
call gitgutter#async#execute(cmd, a:bufnr, handler) |
@kodemeister Thank you for all that, especially the patch. It certainly seems that running an async job at startup causes these rendering problems. @siegfried-bosch @psliwka Does the patch fix it for you? |
|
Update: managed to trigger the bug on different file now. The patch indeed fixes the issue for me. |
Thanks, everyone, for your help with identifying and fixing this problem. |
I meet the same problem "string ^[[?12;4$y to appear "on top of" the first line". |
Also seeing string ^[[?12;4$y appearing on top of the first line after updating plugins using vim-plug. |
What terminal code refers this to? I only see |
@chunchengwei Which is "this" plugin: syntastic or gitgutter? |
@jward7 Empty files which are staged or only in the working tree? |
@airblade syntastic |
@chunchengwei Try Source: vim-syntastic/syntastic#2238 (comment) I'm confident this problem isn't due to gitgutter; it's a bug somewhere in the terminal and/or vim. See here for some suggestions about where to look for help. |
Not to reopen this issue, but for the benefit of others who might end up here searching on terminal control sequence This may be related to limitations in some terminal applications. I have reproduced in iTerm2 3.4.16 but have not seen the issue in Terminal 2.12.7. iTerm2 reports as VT100 ( |
It's a vim problem: tpope/vim-rails#579 (comment). |
The latest commit seems to be causing the string
^[[?12;4$y
to appear "on top of" the first line of the first buffer I open (screenshot attached). It disappears when I start moving around in the buffer.Looks like part of a regex? Anyway, I reverted to a previous commit and the issue did indeed go away so I assume this is to do with the latest commit.
I'm using vim 8.1.
Many thanks.
The text was updated successfully, but these errors were encountered: