View Issue Details

IDProjectCategoryView StatusLast Update
0012344LazarusIDEpublic2011-12-01 11:22
ReporterMariusAssigned ToMartin Friebe 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version0.9.27 (SVN)Product Build 
Target Version0.9.30Fixed in Version0.9.29 (SVN) 
Summary0012344: Renaming a component will change the editor line number.
DescriptionIf a component name is changed the editor changes the focus to where the change has been made (in the form declaration). For instance if the cursor is in the constructor code and i'm renaming a pagecontrol the editor focus (line) is changed to the line with pagecontrol: tpagecontrol. Focus is no longer on the constructor code.
TagsNo tags attached.
Fixed in Revision21829
LazTarget0.9.30
WidgetsetWin32/Win64
Attached Files
  • synpatch.patch (545 bytes)
    Index: synedit/synedit.pp
    ===================================================================
    --- synedit/synedit.pp	(revision 21560)
    +++ synedit/synedit.pp	(working copy)
    @@ -4975,7 +4975,7 @@
         FInternalBlockSelection.StartLineBytePos := aStartPoint;
         FInternalBlockSelection.EndLineBytePos := aEndPoint;
         FInternalBlockSelection.SelText := AValue;
    -    FCaret.LineBytePos := FInternalBlockSelection.StartLineBytePos;
    +    //FCaret.LineBytePos := FInternalBlockSelection.StartLineBytePos;
       finally
         EndUndoBlock;
       end;
    
    synpatch.patch (545 bytes)

Activities

Paul Ishenin

2009-09-04 04:29

manager   ~0030390

This can be changed either in the synedit or in the sourceeditor. Attached patch shows this. I suggest to add another argument to the synedit to handle cursor move.

2009-09-04 04:29

 

synpatch.patch (545 bytes)
Index: synedit/synedit.pp
===================================================================
--- synedit/synedit.pp	(revision 21560)
+++ synedit/synedit.pp	(working copy)
@@ -4975,7 +4975,7 @@
     FInternalBlockSelection.StartLineBytePos := aStartPoint;
     FInternalBlockSelection.EndLineBytePos := aEndPoint;
     FInternalBlockSelection.SelText := AValue;
-    FCaret.LineBytePos := FInternalBlockSelection.StartLineBytePos;
+    //FCaret.LineBytePos := FInternalBlockSelection.StartLineBytePos;
   finally
     EndUndoBlock;
   end;
synpatch.patch (545 bytes)

Martin Friebe

2009-09-23 01:15

manager   ~0030923

The issue was more complex. It also happens if you add a new component to the form. Only in this case the source-text moves a line down, and the caret needs to follow.

Done in revision 21829.

Please test and close if ok

Issue History

Date Modified Username Field Change
2008-10-11 12:29 Marius New Issue
2008-10-11 12:29 Marius Widgetset => Win32
2008-10-17 21:36 Vincent Snijders LazTarget => 1.0
2008-10-17 21:36 Vincent Snijders Assigned To => Mattias Gaertner
2008-10-17 21:36 Vincent Snijders Status new => assigned
2008-10-17 21:36 Vincent Snijders Target Version => 1.0.0
2009-09-04 04:29 Paul Ishenin LazTarget 1.0 => 0.9.30
2009-09-04 04:29 Paul Ishenin Note Added: 0030390
2009-09-04 04:29 Paul Ishenin Target Version 1.0.0 => 0.9.30
2009-09-04 04:29 Paul Ishenin File Added: synpatch.patch
2009-09-04 04:29 Paul Ishenin Assigned To Mattias Gaertner => Martin Friebe
2009-09-23 01:15 Martin Friebe Fixed in Revision => 21829
2009-09-23 01:15 Martin Friebe Status assigned => resolved
2009-09-23 01:15 Martin Friebe Fixed in Version => 0.9.29 (SVN)
2009-09-23 01:15 Martin Friebe Resolution open => fixed
2009-09-23 01:15 Martin Friebe Note Added: 0030923
2011-12-01 11:22 Marc Weustink Status resolved => closed