aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorgi Kirilov <in.the@repo>2020-05-19 22:22:52 +0300
committerGeorgi Kirilov <in.the@repo>2020-05-19 22:44:56 +0300
commit07761cf7987ede340b0285357d21b7226009699a (patch)
tree5056596d1a03d360f566153da35a2a6f63defc69
parent5303063d777f029dcab86ae32fed18c7732d769a (diff)
downloadvis-toggler-07761cf7987ede340b0285357d21b7226009699a.tar.gz
Fail early if no word matched
Otherwise the toggle func was still called, but with an empty range.
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 3f4e146..b9e336a 100644
--- a/init.lua
+++ b/init.lua
@@ -103,7 +103,7 @@ local function operator_new(key, handler, object, motion, help, novisual)
end
local function preprocess(tbl)
- local cfg, ord = {}, P(-1)
+ local cfg, ord = {}, P(false)
for _, options in ipairs(tbl) do
for i, key in ipairs(options) do
cfg[key] = {i, options}