-
Notifications
You must be signed in to change notification settings - Fork 112
Scroll the quickfix window only if cursor is on the last line
Quickfix window will always scroll if you start a command by :AsyncRun
(not :AsyncRun!
)
Quickfix window will scroll only if the cursor is on the last line, just like output panel in visual studio.
But there are some downsides:
- unlike
:cbottom
it is not native supported by vim (simulated in vimscript), checking cursor will have a lower performance, but most of time it's acceptable. - sometimes cursor blinks in a strange frequency, but not noticeable.
Due to these matters, g:asyncrun_last
has been set to zero by default, you can turn it on manually.
Hope Bram will support it native some day, and it will be unnecessary to simulated in vimscript any more.
Quickfix window will always scroll, unless current window is a quickfix window and the cursor isn't on the last line.
It is a compromise to both performance and functionality. if you want to read something while background command is still running, you can move to the quickfix window and move the cursor away from the last line.
- if current window isn't a quickfix window, quickfix window will scroll if
pumvisible()
returns 0. - if current window is quickfix window, it will scroll only if the cursor is on the last line.
Something like mode 2, but will do an extra check when you are editing, and disable quickfix scrolling when auto complete popup window is visible.