diff options
author | Georgi Kirilov <> | 2020-11-22 15:10:49 +0200 |
---|---|---|
committer | Georgi Kirilov <> | 2023-10-04 18:24:59 +0800 |
commit | 6f02304e2530c5ee843e6a7081d5bfbb2f03393c (patch) | |
tree | 95fff8a4400e3d20647cc07a1054023cc7d91712 /pairs.lua | |
parent | 29a137c58077c4a4c521f1859d56a0da946c8ab9 (diff) | |
download | vis-pairs-6f02304e2530c5ee843e6a7081d5bfbb2f03393c.tar.gz |
Fix outer object when cursor is on its last char
It skipped right to the parent object without first selecting
the current one.
Diffstat (limited to 'pairs.lua')
-rw-r--r-- | pairs.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -108,7 +108,7 @@ local function get_expanded_state(win, key) for selection in win:selections_iterator() do local range = selection.range local start, finish = get_range(key, win.file, selection.pos) - if start and finish and start[1] - 1 < range.start and range.finish < finish[2] then + if start and finish and (range.finish - range.start) < (finish[2] - start[1]) then return false end end |