Closed atusy closed 1 year ago
Currently, colwise offset of labels and jumps are byte-wise.
https://github.com/folke/flash.nvim/blob/edb82f763ac2b63006154e9da8b6629b570de551/lua/flash/highlight.lua#L117
https://github.com/folke/flash.nvim/blob/5c9505a19edcbb236d367282584ed5f02ccd4fb4/lua/flash/jump.lua#L193
This results in the following examples to label on the same character, い, although they have different after values {0, 1}, {0, 2}, and {0, 3}.
い
{0, 1}
{0, 2}
{0, 3}
require("flash").jump({pattern = "あ", search = { wrap = false }, label = {after = {0, 1}, before = false}}) require("flash").jump({pattern = "あ", search = { wrap = false }, label = {after = {0, 2}, before = false}}) require("flash").jump({pattern = "あ", search = { wrap = false }, label = {after = {0, 3}, before = false}})
The above screenshot comes from a buffer below.
aaaあいx aaaあいx
I think offset should work char-wise not byte-wise.
none
No response
Did you check the docs?
Is your feature request related to a problem? Please describe.
Currently, colwise offset of labels and jumps are byte-wise.
https://github.com/folke/flash.nvim/blob/edb82f763ac2b63006154e9da8b6629b570de551/lua/flash/highlight.lua#L117
https://github.com/folke/flash.nvim/blob/5c9505a19edcbb236d367282584ed5f02ccd4fb4/lua/flash/jump.lua#L193
This results in the following examples to label on the same character,
い
, although they have different after values{0, 1}
,{0, 2}
, and{0, 3}
.The above screenshot comes from a buffer below.
Describe the solution you'd like
I think offset should work char-wise not byte-wise.
Describe alternatives you've considered
none
Additional context
No response