mirror of
https://github.com/neovim/neovim.git
synced 2026-07-26 10:42:10 +00:00
fix(ui2): fix ruler on repeated messages
Problem: a long message is cropped to keep the ruler visible. But when the message is repeated, it can be written over the ruler, while the repetition indicator "(1)" is still placed just before the ruler, which ends up somewhere inside the message. Solution: currently, long messages are only cropped when setting the 'last' virttext. Make sure this happens after a repeated long message.
This commit is contained in:
@@ -1200,6 +1200,15 @@ describe('messages2', function()
|
||||
-----------------------------------0,0-1 All|
|
||||
]])
|
||||
feed('<C-L>')
|
||||
-- message with repetition indicator keeps ruler intact
|
||||
command('echo "-"->repeat(&columns)')
|
||||
command('echo "-"->repeat(&columns)')
|
||||
screen:expect([[
|
||||
^ |
|
||||
{1:~ }|*12
|
||||
--------------------------------(1)0,0-1 All|
|
||||
]])
|
||||
feed('<C-L>')
|
||||
-- when the ruler is configured smaller, there is more space for messages
|
||||
command('set rulerformat=%l | redraw | echo "-"->repeat(&columns)')
|
||||
screen:expect([[
|
||||
|
||||
Reference in New Issue
Block a user