diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-05-10 08:15:53 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2024-05-10 08:15:53 +0200 |
| commit | 61465acff5beed5467d869d6f0e8947fda5f7041 (patch) | |
| tree | ba6d23be39a8a6103832f13e752ac5bdca87524f /spellcheck.lua | |
| parent | dc41e741da7398c316e9875c23d6f9efda748bb1 (diff) | |
| download | vis-spellcheck-61465acff5beed5467d869d6f0e8947fda5f7041.tar.gz vis-spellcheck-61465acff5beed5467d869d6f0e8947fda5f7041.zip | |
return early if viewport is not available
Diffstat (limited to 'spellcheck.lua')
| -rw-r--r-- | spellcheck.lua | 1 |
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 |
