#128 changed behaviour of search?

release
closed-fixed
Program (402)
5
2002-11-19
2002-02-09
Andrew Hood
No

I used to be able to do a regex replace with a search
arg of only a ^ (start of line) or $ (end of line).
With the current CVS head (Fri Feb 8 23:26:26 2002
UTC) this finds the target but does not do the replace.
I have to change these to ^. and .$ and add & to the
replace string.
This behaviour is independent of the state of REPLACE_SCOPE

Built on: Linux, x86, GNU C
Built at: Feb 9 2002, 13:53:30
With Motif: 2001 [@(#)Motif Version 2.1.30]
Running Motif: 2001
Server: The XFree86 Project, Inc 40100000

Discussion

  • Joor Loohuis

    Joor Loohuis - 2002-02-09

    Logged In: YES
    user_id=197101

    I cannot reproduce this problem with a version from cvs that
    I built just now. I tried replacing '^' (regex) with '# ',
    and selecting 'window' to apply the replacement to all
    lines, which works as expected. Same for making a selection,
    and applying a replacement to it.

     
  • Andrew Hood

    Andrew Hood - 2002-02-10

    Logged In: YES
    user_id=36856

    Actually you are right Joor.
    This is an artifact of the make process.
    If you want to change any make option you have to "make clean".
    I did not see this documented anywhere.
    You could fix this by making all *.[cy] files dependent on
    all makefile/Makefile.* files.

     
  • Eddy De Greef

    Eddy De Greef - 2002-02-10

    Logged In: YES
    user_id=73597

    Actually, there is one change of behavior in 5.2
    that can have unexpected consequences for these
    particular patterns: the binding of CTRL-T was changed
    from "replace again" to "replace and find again".
    This action takes into account the current selection, but
    for the "^" and "$" patterns the match has a zero length,
    causing the "replace" part of "replace and find" to fail
    when trying to repeat replacements.

    When I first read you bug report, I assumed that this was
    what you meant. Are you sure that it was only a build
    issue?

     
  • Eddy De Greef

    Eddy De Greef - 2002-02-10

    Logged In: YES
    user_id=73597

    Actually, there is one change of behavior in 5.2
    that can have unexpected consequences for these
    particular patterns: the binding of CTRL-T was changed
    from "replace again" to "replace and find again".
    This action takes into account the current selection, but
    for the "^" and "$" patterns the match has a zero length,
    causing the "replace" part of "replace and find" to fail
    when trying to repeat replacements.

    When I first read you bug report, I assumed that this was
    what you meant. Are you sure that it was only a build
    issue?

     
  • Andrew Hood

    Andrew Hood - 2002-02-11

    Logged In: YES
    user_id=36856

    Looking again you seem to be right Eddy.
    I tried it using the "replace & find" button and the
    replaces all fail.

     
  • Eddy De Greef

    Eddy De Greef - 2002-02-11
    • assigned_to: nobody --> edg
     
  • Eddy De Greef

    Eddy De Greef - 2002-02-11

    Logged In: YES
    user_id=73597

    You can use the Replace button as a workaround.
    Also, "replace again" has been bound to Alt-T.

    But I'll see whether I can do something about
    the replace & find problem with these patterns.

     
  • Eddy De Greef

    Eddy De Greef - 2002-11-19
    • labels: --> Program
    • milestone: --> release
    • status: open --> closed-fixed
     
  • Eddy De Greef

    Eddy De Greef - 2002-11-19

    Logged In: YES
    user_id=73597

    A fix should be in CVS now.
    Can someone verify that it solves the problem?

     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks