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
unattended forced auto scrolling upward in Vim v8.2 #9236
Comments
Fixed in VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Oct 31 2021 15:40:05) by pulling in closing this issue |
Ouch, lasted unstable Debian (bookworms) has this problem. Not file name-specific, but file-content is triggering this. And to disable it, I have narrowed it down to
Will continue to track this down as it is a sporadically occurring bug. |
check your terminal configuration, specifically $TERM and can you check, whether this happens in xterm? |
KDE Console, at the moment. will revert to xterm next and therein. And have a KDE keyboard event monitor up as well. Stay tune. |
If I press Enter 28 times while in insert mode then press Escape, I'm already at the end of the buffer. Are you at the end of the buffer when you execute a normal command which is documented to move to the bottom of the buffer?
This file does not do much by itself. It's only meant to detect the filetype of a buffer when it can't be inferred from the extension in its name. But when the filetype is set, the
You can check which scripts have been sourced during the current Vim session with If possible, try to compare the output of
Or better yet, write it in a file, before the issue:
Then again, in a second file, after the issue:
Then, diff the 2 log files:
What is the output of |
It's possible that the key that you press after Escape is joined with the latter and recognized as some other function key. If that's the issue, then this command might help:
You can find it at You might also try to log the keys received by Vim:
This requires the patch 7.4.1310. You can follow the file with
Inside this log, you want to look for all the lines matching the pattern "raw key input":
Look for lines starting with a timestamp which matches a time after the issue has started to occur.
They match respectively an
If you can't reproduce the issue in xterm, it might mean that the issue is influenced by a terminal option. In that case, run this command in xterm (make sure you use a recent Vim version with the patch 8.2.3731):
Then run this other command in a terminal where you can reproduce the issue:
Now, diff the 2 logs:
And check out the differences. To make the process easier, I have a script which can turn the output of Source it while Vim is running in xterm (or whatever terminal where you cannot reproduce the issue), and run the custom command that it installs: Next, start Vim in a terminal where you can reproduce the issue, and source If you're interested, here is the script installing
|
Before I perform the suggested investigative work, I wanted to report that this is now happening in ArchLinux vim v8.2.3890 Filetype used with this same issue experience:
I removed 'Debian" from the issue title. No |
Before I perform the suggested investigative work, another quick workaround to this issue for me on ArchLinux (and possibly other distros) is to reinstate the following line in global
EDITED: @lacygoill, by any chance, would my removal of I now have your DebugTermCap poised and ready. Running v8.2.3890. Will clone all relevant VIM-related files before embarking on a debug (perhaps try to recreate on another host?) |
Steps to reproduce
Very difficult to reproduce this VIM editor session
i
)Feels like keyboard is stuck but this behavior does not show in earlier VIM 8.1 or v7s.
This bizzare behavior does not happen when executing
vim -u NONE /tmp/xxxx
but remains a normal edit session (that we all come to know of).I did a strace of the command in question (blind man approach) to investigate WHICH file got opened for my default VIM editor session.
and with a bit of grep filtering, I get the following VIM files being opened for my default session:
I removed the following entries for
/strace -f usr/bin/vim -u NONE /tmp/xxxx
:Then went to work on the first suspect
/usr/share/vim/vim82/scripts.vim
.cd /usr/share/vim/vim82
mv scripts.vim scripts.vim.disabled
IT WORKS! So ithere is something about this /usr/share/vim/vim82/scripts.vim that is forcing me into autoscroll.
Now, here comes the mysterious part:
I put the scripts.vim back in.
All is well.
No bug, everything is fine.
Most mysterious behavior EVAH!
Details:
Desktop: KDE Plasma
Terminal: KDE Console
$HOME bashrc: none
System bashrc: none
$HOME .vim: none
Expected behaviour
I expect the default editor session to remain stationary upon no keystroke; not to move the buffer to the first line all by itself.
Operating system
KDE Console/KDE Plasma/Linux 5.10.0-9-amd64 #1 SMP Debian 5.10.70-1 (2021-09-30) x86_64 GNU/Linux
Version of Vim
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Mar 02 2021 02:58:09) Included patches: 1-2434
Logs and stack traces
The text was updated successfully, but these errors were encountered: