hlissner / evil-snipe

2-char searching ala vim-sneak & vim-seek, for evil-mode
MIT License
336 stars 25 forks source link

evil-snipe-skip-leading-whitespace inconsistency #94

Open bschwehn opened 9 months ago

bschwehn commented 9 months ago

What did you expect to happen?

This is using doom emacs, which maps t to evil-snipe-t and f to evil-snipe-f.

When I do "vt ", expect visual mode until (exlclusive) next space. When I do "vf ", expect visual mode until (inlclusive) next space.

What actually happened?

When I do "vt ", visual mode until (inlclusive) next space. When I do "vf ", expect visual mode until (exlclusive) next space.

Similarly "t " and "f " both do the same thing and go to the next space, when "t " should go to the last char before the space.

Describe your attempts to resolve the issue

Setting evil-snipe-skip-leading-whitespace nil ressolves the issue. However the docstring for evil-snipe-skip-leading-whitespace indicates that this setting should only affect behaviour for leading whitespace in a line.

Steps to reproduce

Have a line

one two three

with cursor at start of line observe:

"t " (= "t[SPC]"): cursor moved to space between one and two. It should instead go to the e in "one" "f " (= "f[SPC]"): cursor moved to space between one and two. This is correct "vt " (= "vt[SPC]"): "one " is selected including the space after "one". Only "one" should be selected "vf " (= "vf[SPC]"): "one" is selected not including the space after "one". Instead "one " should be selected

Package commit

c2108d3

System Information

Emacs 29 with doom