mirror of
https://github.com/neovim/neovim.git
synced 2026-02-04 03:21:29 +10:00
fix(column): add truncated width during estimation for 'statuscolumn'
Problem: Estimated 'statuscolumn' width estimated is not properly used,
executing the `w_redr_statuscol` path unnecessarily.
Solution: Adjust `w_nrwidth` and 'statuscolumn' width before anything
is actually drawn in a `win_update()`.
This commit is contained in:
@@ -616,4 +616,17 @@ describe('statuscolumn', function()
|
||||
|
|
||||
]])
|
||||
end)
|
||||
|
||||
it("is only evaluated twice, once to estimate and once to draw", function()
|
||||
command([[
|
||||
let g:stcnr = 0
|
||||
func! Stc()
|
||||
let g:stcnr += 1
|
||||
return '12345'
|
||||
endfunc
|
||||
set stc=%!Stc()
|
||||
norm ggdG
|
||||
]])
|
||||
eq(2, eval('g:stcnr'))
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user