diff options
| author | Luuk van Baal <luukvbaal@gmail.com> | 2025-05-14 12:28:05 +0200 |
|---|---|---|
| committer | luukvbaal <luukvbaal@gmail.com> | 2025-05-14 15:36:42 +0200 |
| commit | d25eb246efc5d8886c72c2e3f0107decf79f625d (patch) | |
| tree | 5cf92830f779e11c3867df4886500b94f745fe53 /runtime/lua/vim/_extui/messages.lua | |
| parent | 4d56dc43c0ea1417db04dd27b8fc4e242184e67b (diff) | |
revert: show "g<" hint when message spills 'cmdheight'
Problem: Hint message to press "g<" for message that spills
'cmdheight' is too intrusive.
Solution: Remove the hint message. Document the meaning of the spill
indicator instead.
Diffstat (limited to 'runtime/lua/vim/_extui/messages.lua')
| -rw-r--r-- | runtime/lua/vim/_extui/messages.lua | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/runtime/lua/vim/_extui/messages.lua b/runtime/lua/vim/_extui/messages.lua index af75eb8ff1..153da340ef 100644 --- a/runtime/lua/vim/_extui/messages.lua +++ b/runtime/lua/vim/_extui/messages.lua @@ -290,13 +290,10 @@ function M.show_msg(tar, content, replace_last, more) else api.nvim_win_set_cursor(ext.wins[ext.tab][tar], { 1, 0 }) ext.cmd.highlighter.active[ext.bufs.cmd] = nil - -- Show hint in box and place [+x] indicator for lines that spill over 'cmdheight'. + -- Place [+x] indicator for lines that spill over 'cmdheight'. M.cmd.lines, M.cmd.msg_row = h.all, h.end_row - local spill = M.cmd.lines - ext.cmdheight - M.virt.msg[M.virt.idx.spill][1] = spill > 0 and { 0, ('[+%d]'):format(spill) } or nil - if spill > 0 then - M.msg_show('verbose', { { 0, ('Press g< to see %d more lines'):format(spill), 0 } }) - end + local spill = M.cmd.lines > ext.cmdheight and ('[+%d]'):format(M.cmd.lines - ext.cmdheight) + M.virt.msg[M.virt.idx.spill][1] = spill and { 0, spill } or nil end end |
