diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-04-25 16:49:09 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2024-04-25 16:49:09 +0200 |
| commit | 44211e9099d0800fb5d35f2367247f0085abcbb7 (patch) | |
| tree | 165c4ce2ddff70311eb76269ae2f6e83363aa4b7 | |
| parent | 0914016d89e3f12429eed41513c7d5ac37fd39be (diff) | |
| download | vis-spellcheck-44211e9099d0800fb5d35f2367247f0085abcbb7.tar.gz vis-spellcheck-44211e9099d0800fb5d35f2367247f0085abcbb7.zip | |
support new viewport table for vis >= v0.9
| -rw-r--r-- | spellcheck.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spellcheck.lua b/spellcheck.lua index 0c3549d..d09f1e9 100644 --- a/spellcheck.lua +++ b/spellcheck.lua @@ -167,7 +167,8 @@ vis.events.subscribe(vis.events.WIN_HIGHLIGHT, function(win) not win:style_define(spellcheck.typo_style_id, spellcheck.typo_style) then return end - local viewport = win.viewport + -- Be backward compatible with vis < v0.9 + local viewport = win.viewport.bytes or win.viewport local viewport_text = win.file:content(viewport) local typos |
