Page 1 of 1

Fixed: Replace: bug in "Prompt on replace" behaviour

Posted: 18 Oct 2012 02:35
by Surveyor

"Replace all" works as expected:
  • if no "Prompt on replace", all occurrences are replaced
  • if "Prompt on replace" checked, all occurrences must be confirmed; routine keeps going until done or Cancel
However, if OK is clicked (instead of Replace all), behaviour is as follows:
  • "Prompt on replace" is not checked - single replacement done (assuming it is found) - expected behaviour
  • "Prompt on replace" is checked - identical behaviour to user clicking "Replace all" - routine keeps asking to replace next find, etc. even if No clicked in prompt dialog.
I would expect that if OK button was clicked, only a single replacement should be done, regardless of status of "Prompt on replace", and if Prompt/No is clicked, the routine should end. Is that a fair expectation of how it should work?

- Surveyor

Re: Replace: bug in "Prompt on replace" behaviour

Posted: 30 Oct 2017 15:59
by Maël
I agree. Pressing OK when "prompt on replace" is checked really should only replace at most one occurrence (one if "yes" is pressed, none if "no" or "cancel" is pressed or nothing is found). However, if "all" is pressed in the confirmation dialog, all following occurrences are replaced without any further confirmation.

Changed accordingly, in the newest version.