View Issue Details

IDProjectCategoryView StatusLast Update
0018228LazarusIDEpublic2010-12-17 23:10
ReportercobinesAssigned ToMartin Friebe 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformLinux i386OSDebianOS VersionSid
Product Version0.9.29 (SVN)Product Build28675 
Target Version0.9.30Fixed in Version0.9.29 (SVN) 
Summary0018228: Undo after delete line does not move caret to correct position
DescriptionAfter a line is deleted and Undo is issued the caret moves to the top of the edit window but does not change to the Y position where the line was deleted.

To reproduce:
Open a file in IDE, move the caret to some line and delete the whole line (Ctrl+Y; or Shift+Down to select and Delete to remove). Press PgUp or PgDown a few times to move the deleted line out of view. Press Ctrl+Z to undo, the cursor will move to top of the edit window but the window will not be scrolled back.
TagsNo tags attached.
Fixed in Revision28738
LazTarget1.0
WidgetsetQT
Attached Files

Activities

Martin Friebe

2010-12-16 04:53

manager   ~0044261

to verify I understand correct:
- Say the caret is on line 130 x-pos 1, this line is centered to the window
- you delete this line.
- you scroll away from the line
- you press undo
- line 130 is restored, and the caret is in line 130 pos 1
=> but line 130 is now on the top (or bottom) of the window, instead of being centered.

Is the above description correct, or do you mean the cursor will be position in a different line (e.g line 120) ?

If the above is correct, this is the indented behaviour.
Scrolling is not an undo-able action.

The caret will return to the correct text-line (130).
If this line is out of view it will be scrolled into view, but not centered.

Martin Friebe

2010-12-16 05:18

manager   ~0044262

Actually just been able to reproduce

caret does not return to line 130 in the example

Martin Friebe

2010-12-16 05:54

manager   ~0044263

partly fixed in 28726.

The caret now moves back to the correct position, and this position becomes visible.

However, if you mark an entire line with Shift cursor down, then the caret was just under the deleted line.
that means if you deleted line 120, and the caret was on 131 then it goes back to 131. And topline will also be 131.
So the restored line itself is not shown ...

Still working on...

Martin Friebe

2010-12-17 04:50

manager   ~0044281

please test and close if ok

cobines

2010-12-17 23:10

reporter   ~0044310

Works great. Thanks!

Issue History

Date Modified Username Field Change
2010-12-16 03:52 cobines New Issue
2010-12-16 03:52 cobines Widgetset => QT
2010-12-16 04:53 Martin Friebe LazTarget => -
2010-12-16 04:53 Martin Friebe Note Added: 0044261
2010-12-16 04:53 Martin Friebe Status new => feedback
2010-12-16 05:17 Martin Friebe Status feedback => assigned
2010-12-16 05:17 Martin Friebe Assigned To => Martin Friebe
2010-12-16 05:18 Martin Friebe Note Added: 0044262
2010-12-16 05:54 Martin Friebe Note Added: 0044263
2010-12-17 04:50 Martin Friebe Fixed in Revision => 28738
2010-12-17 04:50 Martin Friebe LazTarget - => 1.0
2010-12-17 04:50 Martin Friebe Status assigned => resolved
2010-12-17 04:50 Martin Friebe Fixed in Version => 0.9.29 (SVN)
2010-12-17 04:50 Martin Friebe Resolution open => fixed
2010-12-17 04:50 Martin Friebe Note Added: 0044281
2010-12-17 04:50 Martin Friebe Target Version => 0.9.30
2010-12-17 23:10 cobines Status resolved => closed
2010-12-17 23:10 cobines Note Added: 0044310