File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -127,8 +127,20 @@ function M.init(enable)
127127 local expect_sign = spellbadword [1 ] ~= ' '
128128 -- Wait until leaving insert mode before showing spell signs. This way,
129129 -- signs won't show while entering a word (which will temporarily be
130- -- misspelled).
130+ -- misspelled). Such a word won't be highlighted by Neovim, but it will
131+ -- be returned by spellbadword(). The approach here could still cause a
132+ -- synchronization issue, since the word would be highlighted when
133+ -- starting to type the next word, and there would be no sign until
134+ -- leaving insert mode. But I couldn't find a preferable solution, since
135+ -- there doesn't appear to be any functions for retrieving just the
136+ -- highlighted misspelled words.
131137 if expect_sign then
138+ api .nvim_create_autocmd (' InsertLeave' , {
139+ callback = function ()
140+ scrollview .refresh ()
141+ end ,
142+ once = true ,
143+ })
132144 return
133145 end
134146 local idx = - 1
You can’t perform that action at this time.
0 commit comments