Description: autonumbering and the action which caused it are combined into a single undo step Steps to Reproduce: prerequisites: autonumbering is enabled. 1. type the quoted text without pressing enter that automubering won't be applied "1. item1 item2" 2. position cursor between item1 and item2 and press enter - line is split in two, both are numbered 3. press ^Z Actual Results: both line split and autonumbering are undone in a single step - impossible to split the line without numbering it. Expected Results: Autonumbering and line split should be undone in two steps like for e.g. automatic URL recognition - when you type a space after the unclickable text URL and then press ^Z, only the URL recognition is undone, to undo the space you have to press ^Z once more - correct behaviour here. Reproducible: Always User Profile Reset: No OpenGL enabled: Yes Additional Info: Version: 7.3.3.2 / LibreOffice Community Build ID: d1d0ea68f081ee2800a922cac8f79445e4603348 CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: kf5 (cairo+xcb) Locale: en-GB (en_GB.UTF-8); UI: en-GB Calc: threaded
I confirm the observed behaviour with Version: 7.3.4.1 (x64) / LibreOffice Community Build ID: 13668373362b52f6e3ebcaaecb031bd59a3ac66b CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: de-DE (de_DE); UI: en-GB Calc: CL but for me it's the expected behaviour, because you've enabled autonumbering. But it's still possible to ad a line brakt with Ctrl+Enter => NAB Feel free to change i back to UNCONFIRMED with a short reasoning, if you disagree.
I believe I already explained why it is a bug - it is inconsistent with undo behaviour for other types of autoformatting in LO e.g. URL recognition. This and only this is the correct undo behaviour because it allows one to undo autoformatting if it was not needed without undoing the action which caused it.
(In reply to lvm from comment #2) > I believe I already explained why it is a bug - it is inconsistent with undo > behaviour for other types of autoformatting in LO e.g. URL recognition. I don't understand. If I type www.example.com and press enter, a new paragraph is inserted and text is recognized as link. Undo deletes paragraph and URL recognition. Perhaps another user understands your argument in a better way.
Actually, we are both correct and the problem is deeper: if after an URL-like text is typed or pasted space bar is pressed, undo undoes only URL autoformatting, to undo the space one has to press ^Z once more. If however one presses enter, undo not only undoes both autoformatting and a new line in a single step, but also for some reason selects the URL text - why? There is no selection after autonumbering is undone. And there is another issue: URL autoformatting is triggered after the first non-URL character is typed, auto numbering however only after a new paragraph - inconsistency again, autonumbering should've been applied as soon as the trigger text "1. " is typed at the beginning of the line. In short, autoformatting and its undo is an inconsistent spaghetti and a good candidate for refactoring, if you ask me. Back to the original point: I am of a very firm opinion that autoformatting and the action which triggered it may not be combined into a single undo step because autoformatting is often wrong and there should be an easy way to undo only autoformatting but not the action which triggered it.
With "autonumbering" do you mean ordered (aka numbered) list?
(In reply to Heiko Tietze from comment #5) > With "autonumbering" do you mean ordered (aka numbered) list? Yes, but it is the same for bulleted lists. And when undoing 7.4.3.2 now selects the trigger expression ("1. " or "* "). If something is already selected you get two selections!
(In reply to lvm from comment #6) > (In reply to Heiko Tietze from comment #5) > > With "autonumbering" do you mean ordered (aka numbered) list? > > Yes, but it is the same for bulleted lists. And when undoing 7.4.3.2 now > selects the trigger expression ("1. " or "* "). If something is already > selected you get two selections! The list style (LS) is an attribute of the paragraph style (PS). PS do have another attribute which defines what PS follows (eg. Text Body after Heading). If you have a PS with LS that is follows at itself, the usual situation for ordinary text, it will continue the numbering. There are no two functions. To "remove" the number you may just toggle the ordered/unordered list off (aka numbers/bullets) or apply a different PS, depending on how you applied the LS. See also bug 152624.
bug 152624 is completely related at all, nor the styles. This bug is about undo's inability to restore the document to the desired state. When a keystroke modifies the document and triggers autoformatting, the first undo step must undo autoformatting only and leave the document in the state after the keystroke modified the document but before autoformatting was applied in case it was applied erroneously, and undo the keystroke itself in a second separate step.
(In reply to lvm from comment #8) > When a keystroke modifies the document and triggers autoformatting... That's not true, you enter a paragraph break and the new paragraph is layout as defined in the style. => NAB
(In reply to Heiko Tietze from comment #9) > (In reply to lvm from comment #8) > > When a keystroke modifies the document and triggers autoformatting... > > That's not true, you enter a paragraph break and the new paragraph is layout > as defined in the style. => NAB Ok, when enter is pressed two things happen: 1. paragraph is split into two 2. style of both is modified to include a list Undo should undo step 2, then step 1, not both together in a single step. If you are implying that under the hood it actually happens the other way around: style changed first, then paragraph is split, that's too bad - underlying technical design is not a consideration in UX. From user's POV enter is pressed to split a paragraph and then list style is applied, and that's how it should be undone. Also this bug was already confirmed (comment 1) so it is NEW, not UNCONFIRMED.