Skip to content

Commit

Permalink
Wait until leaving insert mode before showing spell signs
Browse files Browse the repository at this point in the history
  • Loading branch information
dstein64 committed Dec 15, 2024
1 parent 284400a commit a6e2ff8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/scrollview/signs/spell.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ function M.init(enable)
local str = fn.getbufline(bufnr, line)[1]
local spellbadword = fn.spellbadword(str)
local expect_sign = spellbadword[1] ~= ''
-- Wait until leaving insert mode before showing spell signs. This way,
-- signs won't show while entering a word (which will temporarily be
-- misspelled).
if expect_sign then
return
end
local idx = -1
local lines = vim.w[winid][name]
if lines ~= nil then
Expand Down

0 comments on commit a6e2ff8

Please sign in to comment.