aboutsummaryrefslogtreecommitdiff
path: root/plugins/spellcheck.lua
diff options
context:
space:
mode:
authorrxi <rxi@users.noreply.github.com>2020-04-27 18:37:26 +0100
committerrxi <rxi@users.noreply.github.com>2020-04-27 18:37:36 +0100
commit8d4088542bb210459633d0afb7be15f93c3d41c8 (patch)
tree0538f3da552389b12e665bb93f34cf0616430db0 /plugins/spellcheck.lua
parent7f5e74a6bc62b660907641775e42547ea35e40d3 (diff)
downloadlite-xl-plugins-8d4088542bb210459633d0afb7be15f93c3d41c8.tar.gz
lite-xl-plugins-8d4088542bb210459633d0afb7be15f93c3d41c8.zip
Updated spellcheck plugin: fixed active word check
Diffstat (limited to 'plugins/spellcheck.lua')
-rw-r--r--plugins/spellcheck.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/spellcheck.lua b/plugins/spellcheck.lua
index 33754ac..3ac4c02 100644
--- a/plugins/spellcheck.lua
+++ b/plugins/spellcheck.lua
@@ -38,7 +38,9 @@ end
local function active_word(doc, line, tail)
local l, c = doc:get_selection()
- return l == line and c == tail and system.get_time() - last_input_time < 0.5
+ return l == line and c == tail
+ and doc == core.active_view.doc
+ and system.get_time() - last_input_time < 0.5
end