Bug 159246 - Inconsistent behavior of cursor behavior when undoing autocorrect change while typing in insert mode vs. overwrite mode
Summary: Inconsistent behavior of cursor behavior when undoing autocorrect change whil...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.4.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: AutoCorrect-Complete Undo-Redo Text-Cursor
  Show dependency treegraph
 
Reported: 2024-01-17 16:35 UTC by William Friedman
Modified: 2024-01-18 06:21 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 William Friedman 2024-01-17 16:35:42 UTC
Description:
If I am typing in insert mode with "autocorrect while typing" turned on, and then I undo an autocorrect, the cursor stays at the point at which I was typing, which is the correct behavior.

If, however, I am typing in overwrite mode with "autocorrect while typing" turned on, and then I undo an autocorrect, the cursor bounces back to the *beginning* of the undone text. In order to return to the place where I was typing, I have to hit "end" or ctrl-arrow. This seems like it must be a bug, but if intentional, I can't fathom why the decision was made. What about undoing an autocorrect in overwrite mode would suggest returning the cursor to the beginning of the undone text? This has real productivity-impairing ramifications: if I am editing a line of text in overwrite mode and insert a space after text that gets autocorrected and undo it, I have to hit an additional keystroke (end or ctrl-arrow) to get back to where I was before.

Steps to Reproduce:
1. Make sure the cursor is in insert mode.
2. Make sure that Tools | Autocorrect | While Typing is checked.
3. Type some text that will get autocorrected, e.g., 1/2 followed by a space.
4. Hit undo. Notice that the text reverts to 1/2 and the cursor stays at the space you typed after the 1/2.
5. Delete the space. The cursor should now be after the 2.
6. Change to overwrite mode.
7. Hit space. 1/2 should now be autocorrected.
8. Hit undo. Notice that the cursor jumps back to the 1.

Actual Results:
Cursor jumps back to the beginning of undone autocorrected text.

Expected Results:
Cursor should stay put at the space afterwards.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 1 BogdanB 2024-01-18 06:21:54 UTC
Confirm with
Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded