Forum > Editor

search and replace all fails after "no"

(1/5) > >>

lazer:
Hi,

unless I'm mistaken search/replace is broken.

cntl-F  : add search string, check replace, define replace string, check prompt on replace ; click replace all 

First instance does not need changing so I click "no" when asked " replace this occurance?".

BYE BYE. !

Game over. Global search/replace is finished.  This is exactly the same as if I clicked Cancel, which I would indeed expect to end the operation.

Surely with the age of this project basics like that must be working ?
Has someone broken this recently ?
(I'm running lazarus-main from yesterday )
Lazarus 2.3.0 (rev main-2_3-2165-gc63984efd6) FPC 3.3.1 x86_64-linux-gtk2

TIA.

bytebites:
Why do you use such a crap program (in your words)?
You promised not to use it.

Martin_fr:
It works here.... (with latest Lazarus 2.3 from 5 minutes ago) 
Tested on Windows, but that should not make a diff in this case.

I tested "Origin": From cursor / From beginning
"Search Scope" = Global
"Direction" = Forward

Pressing "no" did prompt me for the next occurrence.

However, if there is no next occurrence, it will silently stop.
It did not say "no more found".
It also does not say "no more found" if the search term does not exist at all. So it seems there is no "no more found" message.

Btw... a bit off topic, but sometimes of interest when "replace" = "edit multiple occurrences"

Syncro edit: https://wiki.lazarus.freepascal.org/New_IDE_features_since#Syncron-Edit
Multi caret: https://wiki.lazarus.freepascal.org/New_IDE_features_since#Multi_Caret
Rename Identifier: https://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools#Rename_Identifier

"Rename Identifier" Does not always catch all (e.g. in some cases inheritance), but it can distinguish between a field and a local or global var, etc.

lazer:
Thanks for testing. This kind of dlg context is the sort of thing where platform dependent bugs can occur. I wondered if was and empty search but I had about 10 occurrences to do, and I checked a couple of times to ensure I was seeing what I thought I was seeing.


dseligo:
It works fine in Lazarus 2.2.4 in Windows 11.

P.S.: And it works in Lazarus 2.3.0 (rev main-2_3-2666-ge150356a73).

Maybe you messed something when you were solving debugger problems?

Navigation

[0] Message Index

[#] Next page

Go to full version