[Geany] Regex replace weirdness

Nick Treleaven nick.treleaven at xxxxx
Thu Sep 30 11:59:38 UTC 2010


On Thu, 30 Sep 2010 08:53:27 +1000
Lex Trotman <elextr at gmail.com> wrote:

> > Personally I think we shouldn't rematch a replaced start of line. I
> > think this is counter intuitive. Is there a reason why the current
> > behaviour is better?
> >
> > Anyway, the reason it works as it does was because that was easier to
> > implement.
> 
> Yes I understood that, as I said the alternative is to implement the
> "find all and replacel" by proper substitute function which finds the
> occurrences first then substitutes them.  I guess if you can do the
> internal equivalent of the find all and mark command then just
> substitute all marked.

It might be possible to record the last start of line and prevent a
rematch that way, avoiding caching.

BTW, you're right that there's more important things to do, but no harm
in discussing improvements IMO.

> Actually it'd be nice to have an option for the
> replacements to be highlighted so I could see the places it made
> changes I didn't mean (does that often happen to you with change all??
> :-)

Could be useful, although maybe better if the replacements were listed
in the Messages window so you don't have to scroll through the whole
document.

Regards,
Nick



More information about the Users mailing list