mirror of
https://github.com/neovim/neovim.git
synced 2026-04-14 03:26:10 +00:00
fix(ui2): correct buffer reference in msg:start_timer() (#38600)
Problem: Mixing "buf" and "M.bufs.msg" in M.msg:start_timer().
Cannot run `require("vim._core.ui2").enable(nil)`.
Solution: Replace "M.bufs.msg" with "buf". Allow `opts == nil`.
Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
(cherry picked from commit f50e7d8205)
This commit is contained in:
committed by
github-actions[bot]
parent
edf4f5689d
commit
b924afb36b
@@ -67,7 +67,7 @@ function M.msg:start_timer(buf, id)
|
||||
|
||||
-- Remove message (including potentially leftover empty line).
|
||||
api.nvim_buf_set_text(buf, mark[1], mark[2], mark[3].end_row, mark[3].end_col, {})
|
||||
if api.nvim_buf_get_lines(ui.bufs.msg, mark[1], mark[1] + 1, false)[1] == '' then
|
||||
if api.nvim_buf_get_lines(buf, mark[1], mark[1] + 1, false)[1] == '' then
|
||||
api.nvim_buf_set_lines(buf, mark[1], mark[1] + 1, false, {})
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user