Re: [code] [Textadept bug] Search & Replace all not working with Regex

From: Mitchell <>
Date: Fri, 24 Mar 2017 18:33:18 -0400 (EDT)


On Fri, 24 Mar 2017, Mitchell wrote:

> Hi Ryan,
> On Thu, 23 Mar 2017, Ryan P.C. McQuen wrote:
>>> I wrote:
>>> This is not quite a bug, but a feature. When text is selected, "Replace
>>> All" acts as "replace all in selection". You need to de-select the "\n"
>>> replaced, and then click "Replace All" to have all "\\n" replaced.
>>> I suppose this behavior may be tweaked to check if selected text exactly
>>> matches replacement text, and if so, go ahead and truly replace all. I'll
>>> have a look into it. It may be tricky with backreferences in replacement
>>> text though.
>> OK, that makes sense. It is a bit disconcerting … it appears that Replace
>> and Replace All have the same functionality in this context then, since
>> Replace would also replace all occurrences within the selected text. Isn’t
>> it more useful for the functionality to differ?
> I agree, which is why I mentioned I'd look into tweaking the current
> behavior.
>> I misspoke a bit, the functionality is not identical, but it doesn’t seem
>> to work as you say:
>> If I select all the text and click Replace All, nothing happens. Is that
>> intentional?
> You found a bug. If the end of the selection is one character before the end
> of the buffer, replace in selection works as expected. I will look into a
> fix. Thanks for the report.

I just committed[1] a change that tweaks the "replace all" behavior to
work during a find/replace session and fixes the "replace all in
selection" bug when the selection extends to the end of the file.

These changes will be in the next nightly.



You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Fri 24 Mar 2017 - 18:33:18 EDT

This archive was generated by hypermail 2.2.0 : Sat 25 Mar 2017 - 06:28:35 EDT