View Issue Details

IDProjectCategoryView StatusLast Update
0034527PatchesPatchpublic2018-11-08 12:06
ReporterBBazAssigned ToMartin Friebe 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.0RC2Product Build 
Target Version2.0Fixed in Version2.0 
Summary0034527: Fix issue 34506 - code editor caret not visible after going back from sparta designer
DescriptionSee https://bugs.freepascal.org/view.php?id=34506
Additional InformationFor some reasons IsVisible returns false when going back from the Sparta docked designer. There are other undetermined conditions that also lead to this, as explained in a note for 34506 by someone else so I think this is really the simplest solution.
TagsNo tags attached.
Fixed in Revision59490
LazTarget2.0
Widgetset
Attached Files
  • issue34506.patch (626 bytes)
    diff --git a/components/synedit/synedit.pp b/components/synedit/synedit.pp
    index a792a1a4..c66c6259 100644
    --- a/components/synedit/synedit.pp
    +++ b/components/synedit/synedit.pp
    @@ -5011,7 +5011,7 @@ begin
         ScreenCaret.ChangePainter(FScreenCaretPainterClass{%H-});
       if ScreenCaret.Painter.ClassType <> TSynEditScreenCaretPainterSystem then // system painter does not use timer
         FScreenCaret.PaintTimer.ResetInterval;
    -  FScreenCaret.Visible := not(eoNoCaret in FOptions) and IsVisible;
    +  FScreenCaret.Visible := not(eoNoCaret in FOptions);
       //if FHideSelection and SelAvail then
       //  Invalidate;
       inherited;
    
    issue34506.patch (626 bytes)

Relationships

duplicate of 0034506 closedMartin Friebe Lazarus code editor caret not visible after going back from sparta designer 

Activities

BBaz

2018-11-08 08:32

reporter  

issue34506.patch (626 bytes)
diff --git a/components/synedit/synedit.pp b/components/synedit/synedit.pp
index a792a1a4..c66c6259 100644
--- a/components/synedit/synedit.pp
+++ b/components/synedit/synedit.pp
@@ -5011,7 +5011,7 @@ begin
     ScreenCaret.ChangePainter(FScreenCaretPainterClass{%H-});
   if ScreenCaret.Painter.ClassType <> TSynEditScreenCaretPainterSystem then // system painter does not use timer
     FScreenCaret.PaintTimer.ResetInterval;
-  FScreenCaret.Visible := not(eoNoCaret in FOptions) and IsVisible;
+  FScreenCaret.Visible := not(eoNoCaret in FOptions);
   //if FHideSelection and SelAvail then
   //  Invalidate;
   inherited;
issue34506.patch (626 bytes)

Martin Friebe

2018-11-08 10:54

manager   ~0111857

The patch needs further review.

If indeed the editor is not visible during WM_Focus, then VisibleChanged should be called later, which should fix the situation.

So before making the suggested change this needs to be evaluated

Martin Friebe

2018-11-08 11:38

manager   ~0111859

please test and close if ok

Issue History

Date Modified Username Field Change
2018-11-08 08:32 BBaz New Issue
2018-11-08 08:32 BBaz File Added: issue34506.patch
2018-11-08 10:52 Martin Friebe Relationship added duplicate of 0034506
2018-11-08 10:54 Martin Friebe Note Added: 0111857
2018-11-08 11:31 Martin Friebe Assigned To => Martin Friebe
2018-11-08 11:31 Martin Friebe Status new => assigned
2018-11-08 11:38 Martin Friebe Fixed in Revision => 59490
2018-11-08 11:38 Martin Friebe LazTarget => 2.0
2018-11-08 11:38 Martin Friebe Note Added: 0111859
2018-11-08 11:38 Martin Friebe Status assigned => resolved
2018-11-08 11:38 Martin Friebe Fixed in Version => 2.0
2018-11-08 11:38 Martin Friebe Resolution open => fixed
2018-11-08 11:38 Martin Friebe Target Version => 2.0
2018-11-08 12:06 BBaz Status resolved => closed