mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
vim-patch:9.0.1461: ruler not drawn correctly when using 'rulerformat'
Problem: Ruler not drawn correctly when using 'rulerformat'.
Solution: Adjust formatting depending on whether the ruler is drawn in the
statusline or the command line. (Sean Dewar, closes vim/vim#12246)
fc8a601c32
This issue was made apparent after neovim/neovim@0f1e2b6, as `showmode()` calls
`win_redr_ruler()` with `curwin` now if it's floating, rather than the last
window if there's no statusline (which usually already shares its right side
with that of the editor).
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
This commit is contained in:
@@ -239,6 +239,25 @@ describe('cmdline', function()
|
||||
|
|
||||
]])
|
||||
end)
|
||||
|
||||
-- oldtest: Test_rulerformat_position()
|
||||
it("ruler has correct position with 'rulerformat' set", function()
|
||||
local screen = Screen.new(20, 3)
|
||||
screen:set_default_attr_ids {
|
||||
[0] = {bold = true, foreground = Screen.colors.Blue}, -- NonText
|
||||
}
|
||||
screen:attach()
|
||||
meths.set_option('ruler', true)
|
||||
meths.set_option('rulerformat', 'longish')
|
||||
meths.set_option('laststatus', 0)
|
||||
meths.set_option('winwidth', 1)
|
||||
feed [[<C-W>v<C-W>|<C-W>p]]
|
||||
screen:expect [[
|
||||
│^ |
|
||||
{0:~ }│{0:~}|
|
||||
longish |
|
||||
]]
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('cmdwin', function()
|
||||
|
Reference in New Issue
Block a user