Menu

#119 Search & Replace Function is Inconsistent.

v1.0.25
closed
nobody
None
5
2016-07-16
2014-09-26
No

I perform my first search & replace on a book.

Steps:
Menu=>Search & Replace...=>Search & Replace
Enter search term and a replace term.
Start at Beginning is unchecked.
Click Repl. All

The first search proceeds "normally", e.g. the Search & Replace function proceeds from the current location in the book and the display updates as the strings are found and replaced.

Steps:
Menu=>Search & Replace...=>Search & Replace
Enter search term and a replace term.
Start at Beginning is unchecked.
Click Repl. All

Now the second and most subsequent times I perform Search & Replace, the function runs much faster as the display is no longer updated. However, all of the search findings in the book are replaced even though Start at Beginning is unchecked.

Sample text:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea Cursor located here ^ commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Sample text replacing a with å on first pass:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea Cursor located here ^ commodo consequåt. Duis åute irure dolor in reprehenderit in voluptåte velit esse cillum dolore eu fugiåt nullå påriåtur. Excepteur sint occåecåt cupidåtåt non proident, sunt in culpå qui officiå deserunt mollit ånim id est låborum.

Note that the a's in the first part were not replaced.

Second pass replacing e with ê:

Lorêm ipsum dolor sit amêt, consêctêtur adipisicing êlit, sêd do êiusmod têmpor incididunt ut laborê êt dolorê magna aliqua. Ut ênim ad minim vêniam, quis nostrud êxêrcitation ullamco laboris nisi ut aliquip êx êa Cursor locatêd hêrê ^ commodo consêquåt. Duis åutê irurê dolor in rêprêhêndêrit in voluptåtê vêlit êssê cillum dolorê êu fugiåt nullå påriåtur. êxcêptêur sint occåêcåt cupidåtåt non proidênt, sunt in culpå qui officiå dêsêrunt mollit ånim id êst låborum.

This time replacements were made to the entire text even though the cursor was exactly in the same location and Start at Beginning was unchecked.

Thanks,

Rick

Discussion

  • hannne

    hannne - 2016-07-16

    When I try to reproduce with a file containing the provided example text, Replace All replaces all occurrences consistently every time. I can't produce the behaviour where it only replaces from the cursor position onwards (i.e. it doesn't behave inconsistently for me). I'm also not seeing the display update along the way (also tried with an 800 line file). I also tried a few combinations of re-opening the file, and running a few R&S or plain Replace first, but Replace All is still consistent.

    I think the Start at Beginning setting is only supposed to apply to Search, so I think Replace All is supposed to always replace ALL, as it says.

    Replace Until End could be a useful feature request, but you should probably explain why you need it - I don't think I ever have.

    I'm closing this for now - feel free to post if you have more info on how to make Replace All only replace until the end of the document, then I'll reopen. Consider including a file - there might be something in your file that I can't see now.

    You're using 1.0.25, right?

     
  • hannne

    hannne - 2016-07-16
    • status: open --> closed
     
  • Richard Tonsing

    Richard Tonsing - 2016-07-16

    Concur with closing. Someone pointed out how I can restrict replace all to just the highlighted section.

    Yes using 1.0.25

     

Anonymous
Anonymous

Add attachments
Cancel