Sublime Forum

Bugs in "whole word" and "regular expression" search [ST2&3]

#1

Hi there

I’ve noticed that in the current stable build (3021) of Sublime Text 3 there seems to be a few bugs if you leave the “whole word” and “regular expression” options enabled, then start a new search. (By starting a new search, I mean closing the search box, highlighting some text, then pressing either Ctrl-F, Ctrl-E or F3 to do a new search.)

If you have the “regular expression” option enabled, the search text is not correctly escaped. E.g. if you selected the text: if (true) { then the correct behaviour should be to escape it as if \(true\) \{ Sublime Text doesn’t do this, generating an error.
(I know I could just keep the “regular expression” option turned off and only turn it on when I want to use it, but were it not for this bug it would be easier to just leave it turned on all of the time. And besides, if you’ve got a lot piece of text with brackets in and you want a regular expression, it’s annoying to have to manually escape the text.)

If you have the “regular expression” option enabled left… it doesn’t seem to actually work until you turn it off and then turn it back on again.
Disabling and then enabling the option with each time you do a search and replace seems to be the only workaround for this.

Finally, exactly the same thing seems to happen with the “whole word” option - it doesn’t seem to actually work until you turn it off and then turn it back on again.

0 Likes

#2

Sorry to bump this, but I thought I’d try using Sublime Text 2 - seeing as that’s really the “live” version of Sublime Text - only to see that exactly the same errors are there too.

0 Likes