#1003 "replace all" processes file more than once

v1.24
closed-fixed
search (2)
Unknown
5
2014-08-14
2013-11-12
No

Geany's replace function replaces until the search string cannot be found again. This seems like just the right thing to do, but it has some undesirable effects
Example:

on a file, do the replace equivalent to
:%s/^...//g

in vim this strips away the first three characters as I intended. Geany leaves only len(line) mod 3 characters on every line - only then '^...' does not match anymore.

I am actually not sure wether everyone finds this unintended behaviour, but it's really unexpected for me. I think it should only scan the file once.

Discussion

  • Anonymous - 2013-11-12

    What about something like ^.{3} ?

     
  • Lex Trotman

    Lex Trotman - 2013-11-12

    This should have been fixed in the 1.23 release, s/^...//g equivalent definitely only removes three characters on current git.

     
  • Lex Trotman

    Lex Trotman - 2013-11-12
    • status: open --> pending-fixed
    • Found in: v1.23.1 --> Unknown
     
  • Lex Trotman

    Lex Trotman - 2013-11-13

    Just an update, it appears that the fix was not completed before 1.23.1 so it will be in 1.24.

     
  • Colomban Wendling

    • status: pending-fixed --> closed-fixed
    • assigned_to: Colomban Wendling
    • Fixed in: None --> v1.24
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks