Bug 44062 - EDITING: Autocorrect can't be undone immediately after inserting a new line
Summary: EDITING: Autocorrect can't be undone immediately after inserting a new line
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.4 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
: 70520 90645 107734 (view as bug list)
Depends on:
Blocks: Undo-Redo Hyperlink
  Show dependency treegraph
 
Reported: 2011-12-22 07:51 UTC by patheticcockroach
Modified: 2018-04-22 07:40 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Screencast showing the bug in LibreOffice 5.1.3 (OpenSUSE) (78.69 KB, video/webm)
2016-10-04 07:43 UTC, Ulrich Windl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description patheticcockroach 2011-12-22 07:51:46 UTC
Problem description: Certain modifications realized automatically by auto-correct, such as URL recognition, can't be undone, if they were triggered by inserting a new line, without first undoing the new line.

Steps to reproduce:
1. Make sure you have auto-correct and URL recognition on
2. Type a URL
3. Hit return
4. Undo (CTRL+Z)

Current behavior: the new line is removed but the auto URL formatting stays.

Expected behavior: the opposite, ie the auto URL formatting is removed but the new line stays. That's the behavior, for instance, if you replace "return" by "space" in the steps to reproduce.

Platform (if different from the browser): Win 7 x64
              
Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1
Comment 1 sasha.libreoffice 2012-05-02 07:55:32 UTC
Thanks for new idea
described behaviour reproduced in 3.5.3. It may be improved. Users may expect that if auto-correction happens, it may be immediately removed by Ctrl-Z.

What is interesting: in msOffice 2007 auto-correction removes first by Ctrl-Z, then removes new line.
Comment 2 patheticcockroach 2012-05-02 08:13:23 UTC
(In reply to comment #1)
> described behaviour reproduced in 3.5.3. It may be improved. Users may expect
> that if auto-correction happens, it may be immediately removed by Ctrl-Z.
Actually, for other kinds of auto-correction, it seems to work in that order. For instance if you type a list like this:
- item 1(return)
(CTRL+Z)- item 2
then you'll get to keep your line break.

Another example: if you reproduce this bug's steps but instead of a line break (step 3) type a space, then CTRL+Z removes the URL auto-detection first.
Comment 3 Buovjaga 2016-09-28 14:19:24 UTC
*** Bug 70520 has been marked as a duplicate of this bug. ***
Comment 4 Ulrich Windl 2016-10-04 07:43:11 UTC
Created attachment 127798 [details]
Screencast showing the bug in LibreOffice 5.1.3 (OpenSUSE)

I was asked to re-check the bug 90645 (which transitively became a duplicate of this bug): The problem wasn't fixed by hoping and waiting ;-)
Comment 5 Yousuf Philips (jay) (retired) 2017-05-10 04:26:15 UTC
*** Bug 107734 has been marked as a duplicate of this bug. ***
Comment 6 Yousuf Philips (jay) (retired) 2017-05-10 04:28:17 UTC
From my duplicate bug.

Steps:
1) Open Writer
2) Type 'http://libreoffice.org/'
3) Press spacebar
4) Check undo list and there will be an entry for 'Typing: " "' and 'AutoCorrect'
5) Press undo to remove the auto hyperlinking of the text
6) Press undo a second time to remove the space
7) Press enter
8) Check undo list and there will be 2 entries for 'Apply attributes' and 1 entry for 'New Paragraph'
9) Press undo once will not remove auto hyperlinking as 'New paragraph' is the first undo in the list

So the workaround is to press spacebar, undo, then enter, then remove the space from the previous row.

Version: 5.4.0.0.alpha0+
Build ID: 74ccd02eda2d6325a27266fd935aba29b3d75020
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-04-27_23:51:14
Locale: en-US (en_US.UTF-8); Calc: group

@Maxim: Would it be simple to move the 'New Paragraph' undo entry before the 'Apply attributes' and any idea why 'Apply attributes' is appearing rather than 'AutoCorrect'?
Comment 7 Xisco Faulí 2017-10-28 18:23:11 UTC
*** Bug 90645 has been marked as a duplicate of this bug. ***