Find ReplaceReplaceReplaceReplace Bug

Open a document and select the magnifying glass to search

Hit the gear on the left of the new search area atop the keyboard and change this to a “find and replace”

Enter a search word that is in the document.

Enter a word with which you wish to replace

Click the arrow to execute a search

Click replace (the word is replaced with the new word)

Click replace again (the new word is placed again, immediately after where it was just inserted)

You can keep clicking replace to have it repeatedly paste the new word

A low priority bug, but it can pop up and prove annoying on slower devices that don’t appear to register the first replace and so the user clicks it multiple times.

Hi,

If I understand you correctly, this isn’t a bug. If you hit “Replace” when there is no selection, then the replacement word will be inserted - this is as it should be, and is standard behaviour for Find and Replace panels.

All the best,
Keith

Hi.

No, I think definitely not standard behavior. Hitting replace replaces the word. Hitting it again inserts the word. The expected behavior is to jump to the next find, even if the button says replace. What Scrivener is doing the first time is replacing the words. Subsequent presses are inserting the word into the text.

At least that’s my experience.

And thanks again for the great software.

MMullins

No, that is not the expected behaviour, at least in Scrivener. Hitting “Replace” does exactly that - it replaces the current selection with the word in the “Replace” text field. If there is nothing in the Replace field, then it just inserts the word.

Different apps do this in different ways. For instance, Ulysses and Word on iOS and macOS do it the way you describe. By contrast, Pages on both iOS and macOS just disables the “Replace” button if there is nothing selected.

Scrivener on both macOS and iOS uses an older standard of letting you use the “Replace” button to replace whatever is at the insertion point, independent of the the Find setting. That said, Scrivener on macOS does have a “Replace & Find” button as well as a “Replace” button, which does do what you are after, so I can see the argument for adopting that behaviour by default on iOS, I suppose.

It’s definitely not a bug, though, just different conventions.

So just a quirk of Scrivener then. I can live with that. I don’t use F&R a lot, so no big deal!

I may well change it for the next update, as I can see the argument for having it move to the next replacement, although it will take a little extra coding.

I wouldn’t call it a “quirk”, but it is something that has gone a little out of fashion. This behaviour used to be the standard across macOS, but since Apple started getting rid of Find panels and making them much more awkward to access by making them header bars, they have had less buttons to play with so have merged some of them.