Bug 165973 - Don't delete the newline after unwanted autocorrect is undone
Summary: Don't delete the newline after unwanted autocorrect is undone
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
25.2.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: AutoCorrect-Complete Undo-Redo
  Show dependency treegraph
 
Reported: 2025-03-30 10:41 UTC by Kuba Orlik
Modified: 2025-08-26 04:42 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screencast of the issue (1017.45 KB, video/mp4)
2025-03-30 10:42 UTC, Kuba Orlik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kuba Orlik 2025-03-30 10:41:11 UTC
Description:
Sometimes when pressing Enter/Return to create a new line, auto-correct kicks in and changes the capitalization of the word, according to the defined set of rules. 

So if I start a new line, type "intentionally-lowercase" and press Enter, it gets corrected to "Intentionally-Lowercase".

When I then press ctrl+z, the word gets reverted to original spelling, but the newly entered newline is deleted. So if I then go to the end of the line and press Enter again... the autocorrect is applied again and the first letter is changed to a capital letter. So the user is stuck in a frustrating loop.

Note that the behavior for entering a newline is different from the behavior when pressing the spacebar.

If I start a line with "intentionally-lowercase" and then press Space, it adds a space and applies autocorrect. I can then press ctrl+z and it only undoes the autocorrect, keeping the space that I've entered, so I can move on with editing the document.

There's an unintuitive difference in behavior then: when pressing Space, autocorrect is treated as a separate step that can be undone. When pressing Enter, the newline and autocorrect are treated as one and can only be undone as a whole, leading to confusion.

I personally thing the behavior that's applied when pressing Space is more intuitive and it would be great if the same behavior was applied when pressing Enter

Steps to Reproduce:
1. In a new line, write a word starting with a lowercase letter
2. Press Enter
3. The word is now capitalized
4. Press ctrl+z

Actual Results:
The word is no longer capitalized, but the newline is gone

Expected Results:
The word is no longer capitalized, but the newline is still there and the cursor doesn't change position


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.2.2.2 (X86_64) / LibreOffice Community
Build ID: 520(Build:2)
CPU threads: 16; OS: Linux 6.13; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
25.2.2-1
Calc: threaded
Comment 1 Kuba Orlik 2025-03-30 10:42:12 UTC
Created attachment 200091 [details]
Screencast of the issue
Comment 2 BogdanB 2025-03-30 13:59:45 UTC
Confirm with
Version: 25.2.1.1 (X86_64) / LibreOffice Community
Build ID: e538fb6403facdfd3db0250c3b3278236c675c2a
CPU threads: 16; OS: Linux 6.11; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded