soheilpro / zsh-vi-search

Adds support for searching the current line (in normal vi mode) to zsh.
MIT License
12 stars 2 forks source link

Always search starting after/before $CURSOR, not on it. #3

Closed comex closed 5 years ago

comex commented 5 years ago

Previously it would search starting at $CURSOR the first time, and one character after/before when executing n/N. Thus, if you executed "/a" while the current highlighted character was "a", the cursor would find the "a" at the current position and not move, but executing "n" would find other instances later in the line. Hoever, this does not match the behavior of (at least) vim, which never searches for a match at the current position.

soheilpro commented 5 years ago

You're right. Thanks for the fix.