-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
redraw doesn't update the UI during substitute #20463
Comments
ext_cmdline
stops sending cmdline_pos
updates during substitute
The following hack seems to work: if vim.api.nvim_get_mode().mode == "c" and vim.fn.getcmdline():find("s/") then
-- HACK: this will trigger redraw during substitue
vim.api.nvim_input("<space><bs>")
end |
Hmm, this seem to be intentional from #9783 |
Damn, you're right. Any idea how my hack works? Would there be a better way to force a redraw that doesnt enter characters? |
The Maybe it can be fixes by also sending the |
So, that's why my hack works. I simply get a new |
I was able to fix this for Noice by calling local ffi = require("noice.util.ffi")
if ffi.cmdpreview then
-- HACK: this will trigger redraw during substitute and cmdpreview,
-- but when moving the cursor, the screen will be cleared until
-- a new character is entered
ffi.update_screen()
end I only call that code during substitute and when the cmdline cursor is not at the end of the cmdline, to prevent flickering. |
When using
vim.ui_attach
withext_cmdline
,:redraw
doesn't update the ui duringsubstitute
The text was updated successfully, but these errors were encountered: