Bug 124569 - Undoing a deletion of text with fieldmarks moves the closing fieldmark 2 chars right
Summary: Undoing a deletion of text with fieldmarks moves the closing fieldmark 2 char...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: bibisectRequest, regression
Depends on:
Blocks: Undo-Redo Fields
  Show dependency treegraph
Reported: 2019-04-05 21:18 UTC by Phil Krylov
Modified: 2020-08-14 07:02 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

sample document (8.25 KB, application/vnd.oasis.opendocument.text)
2019-04-05 21:19 UTC, Phil Krylov

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Krylov 2019-04-05 21:18:05 UTC
Undoing a deletion of text with fieldmarks moves the closing fieldmark 2 chars right. Further redo/undo actions cause more destruction.

Steps to Reproduce:
1. Here (see attachment) is a simple document containing a fieldmark pair (generated using the script from bug 116960). The fieldmarks are between || vertical line characters. Select everything between | characters (inclusively, to be sure you also select both invisible fieldmark characters).
2. Press Del.
3. Press Undo.

Actual Results:
The closing fieldmark (and the shading) has moved 2 characters right, including the gray shading. [To have more fun: Press Redo. More text is deleted than the first time. Press Undo again. Different things can happen depending on your version. An assertion crash, removal of the first fieldmark etc.]

Expected Results:
Proper undo of fieldmark deletion.

Reproducible: Always

User Profile Reset: No

Additional Info:
The earliest version where the bug can be reproduced exactly is In, I can't select anything, Mac download is missing, and do not let you delete fieldmarks, seems to work properly.
Comment 1 Phil Krylov 2019-04-05 21:19:09 UTC
Created attachment 150550 [details]
sample document
Comment 2 Dieter 2019-04-07 09:03:02 UTC
I confirm it with

Version: (x64)
Build-ID: 2b840030fec2aae0fd2658d8d4f9548af4e3518d
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: threaded
Comment 3 Buovjaga 2020-06-04 18:08:11 UTC
I tried to test this with old versions (3.5, 3.6, 4.0) in the Linux 43all repo, but I get this upon deleting: "Readonly content cannot be changed. No modifications will be accepted"

Please advise.
Comment 4 raal 2020-08-14 05:30:31 UTC
Looks correct in Version:
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
Vlákna CPU: 4; OS: Linux 4.15; Vykreslování UI: výchozí; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: cs-CZ
Calc: threaded

Please retest with current version, thank you
Comment 5 Dieter 2020-08-14 07:02:13 UTC

Version: (x64)
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: threaded

Additional information: It's only possible to delete field, if field name is shown.