fix(status): fix mode change delay issues in neovim 0.9

This commit is contained in:
Micah Halter
2023-03-16 13:34:31 -04:00
parent 6ccab3d2cd
commit f5d18eabca
+5 -1
View File
@@ -1059,7 +1059,11 @@ function M.component.mode(opts)
spell = false,
surround = { separator = "left", color = M.hl.mode_bg },
hl = M.hl.get_attributes "mode",
update = "ModeChanged",
update = {
"ModeChanged",
pattern = "*:*",
callback = vim.schedule_wrap(function() vim.cmd.redrawstatus() end),
},
}, opts)
if not opts["mode_text"] then opts.str = { str = " " } end
return M.component.builder(M.utils.setup_providers(opts, { "mode_text", "str", "paste", "spell" }))