Skip to content

Commit

Permalink
fix(char): fixed tT at current. Fixes #128
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jul 5, 2023
1 parent 6659a94 commit a1c8aa6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lua/flash/plugins/char.lua
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,20 @@ function M.left()
end

function M.next()
M.state:jump({ count = vim.v.count1, forward = M.state.opts.search.forward })
M.state:jump({
count = vim.v.count1,
forward = M.state.opts.search.forward,
current = M.motion:lower() == "t",
})
return true
end

function M.prev()
M.state:jump({ count = vim.v.count1, forward = not M.state.opts.search.forward })
M.state:jump({
count = vim.v.count1,
forward = not M.state.opts.search.forward,
current = M.motion:lower() == "t",
})
-- check if we should enable wrapping.
if not M.state.opts.search.wrap then
local before = M.state:find({ count = 1, forward = false })
Expand Down

0 comments on commit a1c8aa6

Please sign in to comment.