Sublime Forum

How should current selection look like after "Replace all"?

#1

I think current behavior should be improved. But perhaps I’m wrong. Please perform next steps in ST3 and tell me your opinion:

  1. Select a word in a text file
  2. Press CTRL+H
  3. Enter a new longer word in the “Replace With:” field
  4. Hit “Replace all”
  5. Observe how the current selection is updated

In my ST3, build 3126, the length of the current selection remains the same as before the replacement and it’s moved to the right with the number of characters that is equals to the difference between new word and old word length.

In my opinion, the selection should include the whole new word after the replacement.

4 Likes

#2

I agree, that it would make sense for the selection to cover the entire replacement text after the replacement. This is what happens if the replacement text is smaller than the text being replaced, so would keep the behavior consistent.

1 Like