Closed jordwalke closed 8 years ago
Oh, wow, that's weird. h
or ll
at the critical point don't cause this issue.
Other movements cause issues too. For example, hitting j
immediately after prevents search wrapping back up to the top entirely, no matter how many times you hit n
. This is all in the code path for *
. Regular /
based searching works fine. Is it difficult to just unify the code paths so that *
is almost as if you had hit /
and then typed whatever word is under the cursor?
h
also causes issues if you press h
enough times to go one character beyond the replaced word.
And again, that is only a problem with *
, not with /
.
They both use the same search function. Not sure what's different, but I've found the cause of the bug for this case. The search functions are very old and probably quite buggy. For example, the binary search used for the reverse search needs to be fixed. I'll put in a fix when I find some time to write a few tests.
:+1: Awesome, @guillermooo
Open a file with the following text:
replaceMe
, and hit*
.replaceMe
, hitcw
to change the word.replacedWith
, followed byescape
.n
immediately, the firstreplaceMe
will be correctly focused. But, if you were to first hitl
to move one character to the right, and then hitn
, then
does not work correctly!