Closed syohex closed 10 years ago
Thanks for the report.
This matching behavior with an empty input is consistent with Emacs' builtin regexp-replace
command, and in my opinion, this is the right behavior too.
Why do you think that matching nothing would be better?
Why do you think that matching nothing would be better?
Its behavior is different from initial state.
This matching behavior with an empty input is consistent with Emacs' builtin regexp-replace command, and in my opinion, this is the right behavior too.
You are right. However vr/query-replace
behaves like this, I suppose all characters should
matched in initial state.
The initial state is only different in the visualization of the matches during regexp input. As soon as you get to the "replace" prompt, the matches are shown.
This was a deliberate decision on my part. I think the user interface would suffer if half the buffer would be filled with visual overlays as soon as vr/replace
is called, especially since the empy input is very rarely (maybe even never) the desired input.
I see.
I suppose it is better that nothing is matched if input string is empty.
screencast is here.