Skip to content

Commit

Permalink
fix: offset for backwards matching pairs motion
Browse files Browse the repository at this point in the history
  • Loading branch information
willothy committed Jun 1, 2024
1 parent 488dc26 commit ac10c7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/precognition/horizontal_motions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ function M.matching_bracket(str, cursorcol, linelen)

if under_cursor == closeBracket then
local depth = 1
offset = offset - 2
offset = offset - 1
while offset >= 0 do
local char = vim.fn.strcharpart(str, offset - 1, 1)
if char == closeBracket then
Expand Down

0 comments on commit ac10c7e

Please sign in to comment.