aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/treesitter/language.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-09-15 13:22:53 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2019-09-15 15:30:48 +0200
commita0f13095aab7b791853e4509516568259706377d (patch)
treef0bed89ae7b7f3c157b48ba751c562ec4b0cf5af /runtime/lua/vim/treesitter/language.lua
parent86e819d492faa2494ffe0e86f37c49eb4c0f2e56 (diff)
downloadrneovim-a0f13095aab7b791853e4509516568259706377d.tar.gz
rneovim-a0f13095aab7b791853e4509516568259706377d.tar.bz2
rneovim-a0f13095aab7b791853e4509516568259706377d.zip
compositor: avoid transmitting invalid lines on double scroll
This happens in an operation which both increases topline and also inserts new lines somewhere in the remaining are. So before drawing any line, win_update() is performing two grid_scroll operations. === A B C D E^ F === Consider that new line will be inserted after line E and screen also scrolled up to line C. First the topline will be adjusted (x is the scrolling region, ! invalid/empty space created by the scroll): === C x D x E^ x F x ! x ! x === and then space is inserted for the new line === C D E^ ! x F x ! x === The problem is that we are now assuming that any invalid area ! created by a scroll is filled with actual contents (by win_line etc) before it is scrolled again. But in this case the last invalid line ! gets scrolled. Ideally we should make win_update smarter and just scroll valid lines for the later scroll (it is just wasteful to scroll the larger area anyway), but for the 0.4 releasejust make the compositor ignore such an invalid line (as it will get overdrawn anyway later).
Diffstat (limited to 'runtime/lua/vim/treesitter/language.lua')
0 files changed, 0 insertions, 0 deletions