diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2026-10-12 13:51:18 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-10-12 13:51:18 -0400 |
| commit | e7cd0e4375a48d32eea6776d6d26e92eed9fedbe (patch) | |
| tree | 1a0e4614ea9965914769a632c59a85cc264f74dc /test | |
| parent | 2323746bfe4af534979249b051e7ada11c63b389 (diff) | |
| download | rneovim-e7cd0e4375a48d32eea6776d6d26e92eed9fedbe.tar.gz rneovim-e7cd0e4375a48d32eea6776d6d26e92eed9fedbe.tar.bz2 rneovim-e7cd0e4375a48d32eea6776d6d26e92eed9fedbe.zip | |
fix(ui): ext_messages/ui2: stale 'rulerformat' "[+]" after :write #42315
Problem:
With 'ruler' in the cmdline ('laststatus=0') and ext_messages (ui2), a
'rulerformat' "%m" does not update the "[+]" indicator after ":write",
until a cursor-move.
Analysis:
`redraw_buf_status_later()` only marks windows with a statusline or
winbar. The symptom is hidden by the legacy message grid because the
write message overwrites the cmdline, which redraws the ruler.
Solution:
Also mark the cmdline 'ruler', like `status_redraw_buf()`.
Diffstat (limited to 'test')
| -rw-r--r-- | test/functional/ui/messages2_spec.lua | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/functional/ui/messages2_spec.lua b/test/functional/ui/messages2_spec.lua index b79db68af8..3f8168ca95 100644 --- a/test/functional/ui/messages2_spec.lua +++ b/test/functional/ui/messages2_spec.lua @@ -1306,7 +1306,7 @@ describe('messages2', function() ]]) end) - it('crops long messages to make place for ruler', function() + it("'ruler' placement truncates long messages", function() command('set noruler | echo "-"->repeat(&columns)') screen:expect([[ ^ | @@ -1405,6 +1405,23 @@ describe('messages2', function() ]]) end) + it("'ruler' updates on 'modified' change #42255", function() + command('set laststatus=0 ruler rulerformat=%m noautoread') + command(('edit %s'):format(t.tmpname(false))) + feed('ihello<Esc>') + screen:expect([[ + hell^o | + {1:~ }|*12 + [+]| + ]]) + command('silent write') + screen:expect([[ + hell^o | + {1:~ }|*12 + | + ]]) + end) + it('pager statusline is not clobbered by DiagnosticChanged redraw #41130', function() exec_lua(function() vim.o.laststatus = 3 |