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

From: Mitchell <m.att.foicica.com>
Date: Thu, 23 Mar 2017 08:26:55 -0400 (EDT)

Hi Ryan,

On Wed, 22 Mar 2017, Ryan P.C. McQuen wrote:

> I am able to continually reproduce this bug, I’ve attached the text I am using and here is a link to a video demonstrating the bug:
> https://app.hyfy.io/v/abH4HihJMS/
> I’m replacing \\n with \n using Regex, and Replace All fails after doing the first replacement.
> I’m on Mac OS 10.11.x, with Textadept 9.3.

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.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Thu 23 Mar 2017 - 08:26:55 EDT

This archive was generated by hypermail 2.2.0 : Fri 24 Mar 2017 - 06:54:04 EDT