diff --git a/components/synedit/lazsyntextarea.pp b/components/synedit/lazsyntextarea.pp index 2d6625e872..62ae0a581d 100644 --- a/components/synedit/lazsyntextarea.pp +++ b/components/synedit/lazsyntextarea.pp @@ -1322,7 +1322,7 @@ begin if LastTextLine <> FirstTextLine then ViewedRange := DisplayView.TextToViewIndex(LastTextLine); rcInval.Bottom := Min(TextArea.TextBounds.Bottom, - TextArea.TextBounds.Top + (ViewedRange.Bottom + AScreenLineOffset + TextArea.TextBounds.Top + ({%H-}ViewedRange.Bottom + AScreenLineOffset - TextArea.TopLine + 2) * TextArea.LineHeight); end; @@ -1525,7 +1525,7 @@ begin if LastTextLine <> FirstTextLine then ViewedRange := DisplayView.TextToViewIndex(LastTextLine); rcInval.Bottom := Min(TextBounds.Bottom, - TextBounds.Top + (ViewedRange.Bottom + AScreenLineOffset - TopLine + 2) * LineHeight); + TextBounds.Top + ({%H-}ViewedRange.Bottom + AScreenLineOffset - TopLine + 2) * LineHeight); end; {$IFDEF VerboseSynEditInvalidate} diff --git a/components/synedit/syneditfoldedview.pp b/components/synedit/syneditfoldedview.pp index a38676bfc9..3e0e939281 100644 --- a/components/synedit/syneditfoldedview.pp +++ b/components/synedit/syneditfoldedview.pp @@ -1073,7 +1073,7 @@ begin s := ''; if (BestLen >= 4) then - s := '[' + EncodeIntEx2(BestPos2 - BestPos) + EncodeIntEx2(BestLen) + s := '[' + EncodeIntEx2({%H-}BestPos2 - {%H-}BestPos) + EncodeIntEx2(BestLen) else if (BestLen = 3) and (BestPos2 - BestPos <= NumEncodeAsOneMax) then s := ']' + EncodeIntEx2(BestPos2 - BestPos); diff --git a/components/synedit/syneditmarkupfoldcoloring.pas b/components/synedit/syneditmarkupfoldcoloring.pas index 84d64575d0..4fcfdf59ea 100644 --- a/components/synedit/syneditmarkupfoldcoloring.pas +++ b/components/synedit/syneditmarkupfoldcoloring.pas @@ -1189,7 +1189,7 @@ begin end; inherited SetLines(pValue); if Enabled then begin - if (pValue <> old) then begin + if (pValue <> {%H-}old) then begin // change: if Assigned(pValue) then begin // add Changehandler diff --git a/components/synedit/syneditmarkupifdef.pp b/components/synedit/syneditmarkupifdef.pp index fe2e96cb0c..e0d9562cad 100644 --- a/components/synedit/syneditmarkupifdef.pp +++ b/components/synedit/syneditmarkupifdef.pp @@ -3648,13 +3648,13 @@ begin // *** END Check outerlines, for node that goes into visible area // *** if found, then it is in DisableOpenEntry and DisabledCloseEntry + FirstEntryIdx := 0; if ScanNodes then begin // FAdjustedTop NodeInfo := FIfDefTree.FindNodeAtPosition(FAdjustedTop, afmNext); //while NodeInfo.HasNode and (NodeInfo.EntryCount = 0) do // NodeInfo := NodeInfo.Successor; Node := NodeInfo.Node; - FirstEntryIdx := 0; if (Node <> nil) and (NodeInfo.StartLine < TopLine) then FirstEntryIdx := Node.EntryCount - 1; // May be visible end diff --git a/components/synedit/synedittextdyntabexpander.pas b/components/synedit/synedittextdyntabexpander.pas index 504fea72ed..1cc34da71b 100644 --- a/components/synedit/synedittextdyntabexpander.pas +++ b/components/synedit/synedittextdyntabexpander.pas @@ -344,7 +344,7 @@ begin if (ALine = nil) or (not GetHasTabs(ALine)) then begin // No tabs in ALine - assert(ALineIsTempText or (not StoredHasTab), 'TSynEditStringDynTabExpander.GetMinimumColumnWidths: ALineIsTempText or (not StoredHasTab)'); + assert(ALineIsTempText or (not {%H-}StoredHasTab), 'TSynEditStringDynTabExpander.GetMinimumColumnWidths: ALineIsTempText or (not StoredHasTab)'); if (not ALineIsTempText) and (not HasStoredData) then TabData.SetLineInfoUnknownEx(AnIndex, False); exit; @@ -605,7 +605,7 @@ begin CachedMergeTopIdx := Idx; MergeMinColumnWidth(NewMergedMinColWidths, CurMinColWidths); - if CachedMergeBottomIdx - CachedMergeTopIdx >= MAX_MERGE then + if {%H-}CachedMergeBottomIdx - CachedMergeTopIdx >= MAX_MERGE then SaveNewMergeCache; end; @@ -625,6 +625,7 @@ begin LineCnt := Count-1; LastLineIdx := Result.FirstLineIdx + Length(Result.ColumnWidths)-1; CachedMergeTopIdx := -1; + NewMergedMinColWidths := nil; While (Idx <= LineCnt) do begin inc(Idx); if Idx > LineCnt then @@ -646,8 +647,6 @@ begin break; if CachedMergeTopIdx < 0 then begin - NewMergedMinColWidths := nil; - if (Idx > AnIndex) or ( Result.ContainsLine(Idx - 1) and Result.IsValidLine(Idx - 1) ) then begin diff --git a/components/synedit/syneditviewedlinemap.pp b/components/synedit/syneditviewedlinemap.pp index d3160f8686..c292da9e1f 100644 --- a/components/synedit/syneditviewedlinemap.pp +++ b/components/synedit/syneditviewedlinemap.pp @@ -1466,7 +1466,9 @@ var FirstViewedX: IntPos; begin if FWrapInfoForViewedXYProc <> nil then - WrapInfoForViewedXYProc(AViewedXY, AFlags, FirstViewedX, ALogPhysConvertor); + WrapInfoForViewedXYProc(AViewedXY, AFlags, FirstViewedX, ALogPhysConvertor) + else + FirstViewedX := 1; inherited InternalGetInfoForViewedXY(AViewedXY, AFlags, AViewedXYInfo, ALogPhysConvertor); diff --git a/components/synedit/syneditwrappedview.pp b/components/synedit/syneditwrappedview.pp index 120037dc71..14dee7598f 100644 --- a/components/synedit/syneditwrappedview.pp +++ b/components/synedit/syneditwrappedview.pp @@ -1276,7 +1276,7 @@ begin PrevLineOffs := 0; if (NextLineOffs > 0) and - ( (PrevLineOffs = 0) or (PrevLineDist > NextLineDist) ) + ( (PrevLineOffs = 0) or ({%H-}PrevLineDist > {%H-}NextLineDist) ) then begin MoveLinesAtEndTo(NextPage, 0, NextLineOffs); Tree.FreeNode(Self); diff --git a/components/synedit/synguttercodefolding.pp b/components/synedit/synguttercodefolding.pp index 0b36c598ac..eb9f8b386a 100644 --- a/components/synedit/synguttercodefolding.pp +++ b/components/synedit/synguttercodefolding.pp @@ -343,7 +343,7 @@ begin R.Bottom := R.Right; NewImg; - DrawNodeSymbol(img.Canvas, R, cfFoldStart, []); // [-] + DrawNodeSymbol({%H-}img.Canvas, R, cfFoldStart, []); // [-] FPopUpImageList.AddMasked(img, img.TransparentColor); img.Free; diff --git a/components/synedit/syngutterlineoverview.pp b/components/synedit/syngutterlineoverview.pp index d1b60e7624..fa4ade79fa 100644 --- a/components/synedit/syngutterlineoverview.pp +++ b/components/synedit/syngutterlineoverview.pp @@ -1572,7 +1572,7 @@ begin end; if Result then begin - if (TextLine < SynEdit.TopLine) or + if ({%H-}TextLine < SynEdit.TopLine) or (TextLine > SynEdit.TopLine + SynEdit.LinesInWindow) then SynEdit.TopLine := Max(1, TextLine - SynEdit.LinesInWindow div 2); diff --git a/components/synedit/synhighlightermulti.pas b/components/synedit/synhighlightermulti.pas index 84f85dcdc2..a68eb80f96 100644 --- a/components/synedit/synhighlightermulti.pas +++ b/components/synedit/synhighlightermulti.pas @@ -1206,7 +1206,7 @@ begin end; if NewSearchPos <= 0 then break; // Not in this line - SearchPos := NewSearchPos + Schemes[j].LastMatchLen; + SearchPos := NewSearchPos + Schemes[j{%H-}].LastMatchLen; StartScheme(Schemes[j], Result, SearchPos, NewSearchPos); end; end; diff --git a/components/synedit/synhighlighterpas.pp b/components/synedit/synhighlighterpas.pp index dc485932ad..bbe80a3b02 100644 --- a/components/synedit/synhighlighterpas.pp +++ b/components/synedit/synhighlighterpas.pp @@ -5522,7 +5522,7 @@ begin dec(FPasStartLevel); end; end - else if IsCollectingNodeInfo and (CollectingNodeInfoList.CountAll > i) then begin + else if IsCollectingNodeInfo and (CollectingNodeInfoList.CountAll > {%H-}i) then begin nd := CollectingNodeInfoList.LastItemPointer; exclude(nd^.FoldAction, sfaMarkup); // not markup able nd^.LogXEnd := 0; diff --git a/components/synedit/synpluginsyncronizededitbase.pp b/components/synedit/synpluginsyncronizededitbase.pp index 064853cb08..81259cae6a 100644 --- a/components/synedit/synpluginsyncronizededitbase.pp +++ b/components/synedit/synpluginsyncronizededitbase.pp @@ -1244,7 +1244,7 @@ begin end; if (not edit) and - (CellAtPos >= 0) and (CellAtPos < Cells.Count) and + ({%H-}CellAtPos >= 0) and (CellAtPos < Cells.Count) and (CompareCarets(Pos, FCells[CellAtPos].LogStart) <= 0) and (CompareCarets(Pos, FCells[CellAtPos].LogEnd) >= 0) then begin diff --git a/components/synedit/test/testmarkupifdef.pas b/components/synedit/test/testmarkupifdef.pas index 32926d95cb..d7a8cd98a0 100644 --- a/components/synedit/test/testmarkupifdef.pas +++ b/components/synedit/test/testmarkupifdef.pas @@ -319,6 +319,7 @@ function TTestMarkupIfDef.TestTextNoIfDef: TStringArray; Result[Length(Result)-1] := s; end; begin + Result := nil; AddLine('//' ); AddLine('//' ); AddLine('//' ); @@ -339,6 +340,7 @@ function TTestMarkupIfDef.TestTextIfDef: TStringArray; end; begin + Result := nil; // 1 AddLine('//' ); AddLine('{$IFDEF a}' );