From 61465acff5beed5467d869d6f0e8947fda5f7041 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 10 May 2024 08:15:53 +0200 Subject: return early if viewport is not available --- spellcheck.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'spellcheck.lua') 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 -- cgit v1.2.3