Bug 153165 - Writer undo loose chars in Find/replace regex with \n in replace
Summary: Writer undo loose chars in Find/replace regex with \n in replace
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.7.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-23 16:37 UTC by michel.sauvard
Modified: 2023-01-24 13:07 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description michel.sauvard 2023-01-23 16:37:18 UTC
Description:
In Writer Linux Office 6.4.7.2
aaabbbccc in document
Find/replace regex .*bbb by \n
Then Undo
The \n is undone but the replaced text is lost; aaaccc

Steps to Reproduce:
1.aaabbbccc in Writer document
2.Find/replace regex .*bbb by \n
3.Undo

Actual Results:
after replace:
aaa
ccc
after undo:
aaaccc

Expected Results:
after replace:
aaa
ccc
after undo:
aaabbbccc


Reproducible: Always


User Profile Reset: No

Additional Info:
none
Comment 1 Stéphane Guillou (stragu) 2023-01-24 13:07:27 UTC
Thank you Michel!

I expect the regex .*bbb to also catch the "aaa" string before.
With version 6.4.7.2, I end up with:

<blank line>
ccc

... which is what I expect. Not sure why you still have "aaa".
Undoing does go back to just "ccc", which is an issue.

However, I tested with a recent master build, as well as all supported versions (7.4 and 7.5), and the results are as expected: undoing goes back to the original string. Marking as "works for me" and recommending updating to version still supported. Please do test in a recent version to see if you see the same as I do.

Version: 6.4.7.2
Build ID: 639b8ac485750d5696d7590a72ef1b496725cfb5
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3; 
Locale: en-AU (en_AU.UTF-8); UI-Language: en-US
Calc: threaded

Version: 7.4.4.2 / LibreOffice Community
Build ID: 85569322deea74ec9134968a29af2df5663baa21
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Version: 7.5.0.2 (X86_64) / LibreOffice Community
Build ID: c0dd1bc3f1a385d110b88e26ece634da94921f58
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7f23dae00fedc9d7119b44b6c44d9eca4f8c87b8
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded