aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spellcheck.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/spellcheck.lua b/spellcheck.lua
index 4af97ad..60623d0 100644
--- a/spellcheck.lua
+++ b/spellcheck.lua
@@ -169,6 +169,7 @@ vis.events.subscribe(vis.events.WIN_HIGHLIGHT, function(win)
end
-- Be backward compatible with vis < v0.9
local viewport = win.viewport.bytes or win.viewport
+ if not viewport then return end
local viewport_text = win.file:content(viewport)
local typos