In replace window, "replace all in selection" doesn't work, replaces everything in all the document, also outside the selected block of text.
Steps to reproduce: Open mousepad Type: aaaaaaaaa Select the central portion of the line: aaa[aaa]aaa Open the replace window(Ctrl+R) Fill: Search for: a Replace with: b Check "Replace all in: Selection" Click the button "Replace" Expected result: aaabbbaaa Actual result: aaabbbbbb
Testing against the latest version from git(88bc2de), the problem seems to be almost fixed. Taking the test scenario from my previous comment, the expect result would be: aaa[bbb]aaa But the selection changes to: aaa[bb]baaa
Created attachment 8460 proposed patch Changing the gravity of the selection end mark from left (TRUE) to right (FALSE) seems to fix the bug. https://developer.gnome.org/gtk3/stable/GtkTextBuffer.html#gtk-text-buffer-create-mark
Looks good to me, thanks.
Theo Linkspfeifer referenced this bugreport in commit 44e798c432058d76c943e05acee08dd2afec6f3b Fix gravity of selection end mark (Bug #10986) https://git.xfce.org/apps/mousepad/commit?id=44e798c432058d76c943e05acee08dd2afec6f3b