Click Replace button (not Enter!) some times. The cursor stays at first found i letter doubling it with every button click.
The another strange behavior. If cursor stay at Find field, then Enter works for search next, but when cursor stay at Replace field, then Enter works for Replace
Did you follow the troubleshooting guide? [Y/N]
Yes.
Expected result
After replace cursor must moves to next find occurrence.
Environment
SYSTEM INFO:
Obsidian version: 1.12.7
Installer version: 1.12.7
Operating system: Windows 11 Pro for Workstations 10.0.26200
Login status: not logged in
Language: en
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 0
Plugins enabled: 0
It doesn’t stay at the first found i. It goes to the next match, which is the newi that Replace added. If you keep doing it you can see that the highlight always moves to the last one.
As a workaround you can press the “Next” arrow on the Find line after each Replace.
For anyone else testing this, I recommend using o instead of i to make the changes easier to see.
This doesn’t seem strange to me, but you can post a feature request if you want. Putting multiple issues in a single report or request makes it hard to track or discuss them (tho it makes sense to explain here why not to use Enter when testing).
Try the same search/replace in VS Code, Word, Notepad, Typora, even Google Docs – all programs after replace jumps to the next occurrence, not stay at current without additional pressing for Next. The current behavior makes more difficult to make some massive text corrections, where I can’t use Replace all for some reason.
The tooltips for buttons states, that Next is F3, and Replace is Enter. So changing behavior of hotkeys that depends on current active field looks strange.
Agree, but both issues relates to one tool. If you insist, I can create a separate bug for hotkeys.
I changed the title to describe the problem (was “Search and replace incorrect behavior”). I also removed “Press Ctrl+H to” from “Open Find/Replace tool” because it’s not the default hotkey (at least not on all OSes) and isn’t needed anyway.
I didn’t know about the tooltip. I agree, that is a problem.