Bug 108477

Summary: Multiple use of Direct Cursor creates only one undo action
Product: LibreOffice Reporter: Samuel Mehrbrodt (allotropia) <samuel.mehrbrodt>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED WONTFIX    
Severity: normal CC: mentoring, samuel.mehrbrodt, xiscofauli
Priority: medium Keywords: difficultyInteresting, easyHack, skillCpp
Version: Inherited From OOo   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 112988    

Description Samuel Mehrbrodt (allotropia) 2017-06-12 07:46:56 UTC
1. Enable direct cursor (Tools -> Options -> LibreOffice Writer -> Formatting Aids -> Direct Cursor)
2. Place the cursor at different positions
3. Try to undo one by one

Expected:
Every cursor position can be undone

Actual:
Only one undo action available which undoes all placements
Comment 1 Samuel Mehrbrodt (allotropia) 2017-06-12 08:03:50 UTC
Code is in SwCursorShell::SetShadowCursorPos, look for "StartUndo" and "EndUndo"
Comment 2 Sumit Chauhan 2019-01-08 16:55:20 UTC
(In reply to Samuel Mehrbrodt (CIB) from comment #0)

> Expected:
> Every cursor position can be undone
 When clicked on undo button it produce the undo action in series regardless of 
 the fact where cursor is placed.

> Actual:
> Only one undo action available which undoes all placements
 What do you mean by one undo action ?

Could you please explain the bug a little bit ?

Thanks.
Comment 3 Samuel Mehrbrodt (allotropia) 2019-01-08 17:47:17 UTC
(In reply to Sumit Chauhan from comment #2)
> (In reply to Samuel Mehrbrodt (CIB) from comment #0)
> 
> > Expected:
> > Every cursor position can be undone
>  When clicked on undo button it produce the undo action in series regardless
> of 
>  the fact where cursor is placed.
> 
> > Actual:
> > Only one undo action available which undoes all placements
>  What do you mean by one undo action ?
> 
> Could you please explain the bug a little bit ?

Yes you place the cursor like 20 times, but when you click undo once, all 20 placements are undone. This should not happen, you should have to click undo 20 times to undo all 20 placements.
Comment 4 Michel Thomas 2020-03-02 18:31:26 UTC
I hope no one's working on this bug right now, I would like to attempt this one.
Comment 5 Xisco FaulĂ­ 2020-07-22 15:13:26 UTC
Dear Michel Thomas,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assign it back to yourself if you're still working on this.
Comment 6 VertD 2020-10-26 22:54:07 UTC
When you place the cursor it automatically undoes the previous placement and the spaces and tabs inserted. Is that not what is expected?
Comment 7 Samuel Mehrbrodt (allotropia) 2020-12-10 10:15:46 UTC
(In reply to VertD from comment #6)
> When you place the cursor it automatically undoes the previous placement and
> the spaces and tabs inserted. Is that not what is expected?

Ok, then this is probably not a bug.
Thanks for investigating!