Menu

#1097 Regexp search & replace for ^ in document does not prefix all lines

None
pending-works-for-me
nobody
v1.23.1
3
2015-07-23
2015-05-04
Robert
No

Geany does not properly replace "^" with regex search with "> " under certain circumstances.

To reproduce: open Geany, create a new file. Then enter "foo<enter><enter>bar". You should now see this:

foo

bar

Then press CTRL-H (search and replace) and enter "^" as in "Search for:" and "> " in "Replace with:". Check "use regular expressions". Then click "replace all" and click button "In Document".

Result: there is no "> " before "bar".

Expected: all lines begin now with "> " (i.e. as if using sed -e "s#^#> #" on the file).

Strange: if you add more line feeds after "bar", still there will be no "> " before "bar" - but the all other lines do.

I have increase priority from default since this seems to affect a very fundamental functionality.

OS info:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.2 LTS
Release:    14.04
Codename:   trusty
$ uname -srvi
Linux 3.13.0-51-generic #84-Ubuntu SMP Wed Apr 15 12:08:34 UTC 2015 x86_64

This is Xubuntu.

Related

Bugs: #1097

Discussion

  • Lex Trotman

    Lex Trotman - 2015-05-04

    Works on current Geany master.

    On 5 May 2015 at 05:29, Robert r_klemme@users.sf.net wrote:


    [bugs:#1097] Regexp search & replace for ^ in document does not prefix all
    lines

    Status: open
    Found in: v1.23.1
    Fixed in: None
    Labels: regexp search replace
    Created: Mon May 04, 2015 07:29 PM UTC by Robert
    Last Updated: Mon May 04, 2015 07:29 PM UTC
    Owner: nobody

    Geany does not properly replace "^" with regex search with "> " under
    certain circumstances.

    To reproduce: open Geany, create a new file. Then enter
    "foo<enter><enter>bar". You should now see this:

    foo

    bar

    Then press CTRL-H (search and replace) and enter "^" as in "Search for:" and
    "> " in "Replace with:". Check "use regular expressions". Then click
    "replace all" and click button "In Document".

    Result: there is no "> " before "bar".

    Expected: all lines begin now with "> " (i.e. as if using sed -e "s#^#> #"
    on the file).

    Strange: if you add more line feeds after "bar", still there will be no "> "
    before "bar" - but the all other lines do.

    I have increase priority from default since this seems to affect a very
    fundamental functionality.

    OS info:

    $ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 14.04.2 LTS
    Release: 14.04
    Codename: trusty
    $ uname -srvi
    Linux 3.13.0-51-generic #84-Ubuntu SMP Wed Apr 15 12:08:34 UTC 2015 x86_64

    This is Xubuntu.


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

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

     

    Related

    Bugs: #1097

  • Colomban Wendling

    • status: open --> pending-works-for-me
     

Log in to post a comment.