From 49787b8cefc55c0ed6934346701ee4f6956e9fa4 Mon Sep 17 00:00:00 2001 From: Georgi Kirilov <> Date: Sun, 22 Nov 2020 15:10:50 +0200 Subject: Fix [ motion * (asdf |(asdf)) -> d[( -> ((asdf)) Before: (asdf asdf)) * (asdf (|asdf)) -> d[( -> (asdf (asdf)) Before: (asdf)) --- pairs.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pairs.lua') diff --git a/pairs.lua b/pairs.lua index 9bed905..f45a947 100644 --- a/pairs.lua +++ b/pairs.lua @@ -224,8 +224,8 @@ end local function opening(win, pos, content, count) local start, _ = get_range(M.key, win, pos, content, count) if not start then return pos end - local exclusive = vis.mode == vis.modes.OPERATOR_PENDING or vis.mode == vis.modes.VISUAL and pos < start[2] - 1 - return start[2] - 1 + (exclusive and 1 or 0) + local exclusive = vis.mode == vis.modes.OPERATOR_PENDING and pos >= start[2] or vis.mode == vis.modes.VISUAL and pos < start[2] - 1 + return start[2] - 1 + (exclusive and 1 or 0), vis.mode == vis.modes.OPERATOR_PENDING and pos >= start[2] end local function closing(win, pos, content, count) -- cgit