#698 Find Previous fails if Use Regular Expressions was checked

v1.22
closed-invalid
nobody
General (289)
5
2013-07-19
2011-05-18
Forest
No

Geany ignores my find-previous command if the most recent find had "Use Regular Expressions" checked.
Noticed in Geany 0.19.1.

Related

Bugs: #698

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2011-06-01

    At least in 0.20, as soon as you click the Regular expression checkbox in the search dialog, the "Previous" button is disabled.

    It would be interesting to search regex backwards, even if it means that Geany is to search the entire file from the beginning for matches up to cursor every time.

     
  • Nick Treleaven

    Nick Treleaven - 2012-01-01
    • status: open --> closed-invalid
     
  • Nick Treleaven

    Nick Treleaven - 2012-01-01

    > Find Previous fails if Use Regular Expressions was checked

    This is by design. Find Previous repeats the last search, and searching backwards with a regex is not supported by any regex engine we use IIUC.

    > search regex backwards, even if it means that
    Geany is to search the entire file from the beginning for matches up to
    cursor every time.

    Personally I don't think we should do that.

     
  • Neil Mayhew

    Neil Mayhew - 2012-05-16

    Other editors I've used can do this (eg vi) so why not geany? It would be very helpful to have this.

    Maybe there's some optimzation that can do it on a line-by-line basis. Eg, move backward a line at a time, finding all the matches in that line with a findall, and picking the last one.

     
  • Alfred Theorin

    Alfred Theorin - 2013-07-17

    I agree this would be really nice to have.

    Otherwise there should be an indication that it is not supported when you try to press Find backward, e.g. a popup dialog. Currently nothing at all happens, which is really confusing.

     
    • Nick Treleaven

      Nick Treleaven - 2013-07-18

      From the Find dialog, the Previous button is disabled when regex is active. But the Search->Find Previous command stays active after regex search. Probably we should at least beep if find previous can't be performed. I would prefer not to add a special message just for that, to avoid work for translators.

      Note: I removed the Private tag for this bug, I assume that was a mistake.

       
  • Lex Trotman

    Lex Trotman - 2013-07-18
    • private: No --> Yes
    • Group: --> v1.22
     
  • Lex Trotman

    Lex Trotman - 2013-07-18

    Regular expression engines do not search backwards so this is not possible.

     
  • Nick Treleaven

    Nick Treleaven - 2013-07-18
    • private: Yes --> No
     
  • Lex Trotman

    Lex Trotman - 2013-07-19

    On 19 July 2013 01:55, Nick Treleaven ntrel@users.sf.net wrote:

    From the Find dialog, the Previous button is disabled when regex is
    active. But the Search->Find Previous command stays active after regex
    search. Probably we should at least beep if find previous can't be
    performed. I would prefer not to add a special message just for that, to
    avoid work for translators.

    It probably just should be insensitive if it can't be used.

    Note: I removed the Private tag for this bug, I assume that was a mistake.

    Status: closed-invalid
    Labels: General
    Created: Wed May 18, 2011 09:49 PM UTC by Forest W
    Last Updated: Thu Jul 18, 2013 03:49 PM UTC
    Owner: nobody

    Geany ignores my find-previous command if the most recent find had "Use
    Regular Expressions" checked.
    Noticed in Geany 0.19.1.


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/geany/bugs/698/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Bugs: #698

  • Alfred Theorin

    Alfred Theorin - 2013-07-19

    I think at least Find Previous in the menu should be disabled so that it doesn't give the impression that it's broken.

     
    • Nick Treleaven

      Nick Treleaven - 2013-07-19

      Yes. There's also a keybinding though, which could beep if regex is enabled.

       
  • Lex Trotman

    Lex Trotman - 2013-07-19

    On 19 July 2013 22:19, Nick Treleaven ntrel@users.sf.net wrote:

    Yes. There's also a keybinding though, which could beep if regex is
    enabled.

    Yes, one day all keybindings should check for menu sensitivity before
    performing any action. Probably should be a separate bug report so it can
    be tracked.


    Status: closed-invalid
    Labels: General
    Created: Wed May 18, 2011 09:49 PM UTC by Forest W
    Last Updated: Fri Jul 19, 2013 01:52 AM UTC
    Owner: nobody

    Geany ignores my find-previous command if the most recent find had "Use
    Regular Expressions" checked.
    Noticed in Geany 0.19.1.


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/geany/bugs/698/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Bugs: #698


Log in to post a comment.

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

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks