Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-T committed Sep 21, 2019
1 parent 030ccb2 commit b5fb97c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions atsynedit/atsynedit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2720,6 +2720,7 @@ procedure TATSynEdit.DoPaintTextTo(C: TCanvas;
TextOutProps.NeedOffsets:= FFontNeedsOffsets;
TextOutProps.TabHelper:= FTabHelper;
TextOutProps.LineIndex:= NLinesIndex;
TextOutProps.CharIndexInLine:= WrapItem.NCharIndex;
TextOutProps.CharSize:= ACharSize;
TextOutProps.MainTextArea:= AMainText;
TextOutProps.CharsSkipped:= NOutputSpacesSkipped;
Expand Down Expand Up @@ -6810,6 +6811,7 @@ procedure TATSynEdit.DoPaintTextFragmentTo(C: TCanvas;
true);

TextOutProps.LineIndex:= WrapItem.NLineIndex;
TextOutProps.CharIndexInLine:= WrapItem.NCharIndex;
CanvasTextOut(C,
cSizeIndentTooltipX,
cSizeIndentTooltipY + FCharSize.Y*(NLine-ALineFrom),
Expand Down
3 changes: 2 additions & 1 deletion atsynedit/atsynedit_canvasproc.pas
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ TATCanvasTextOutProps = record
NeedOffsets: TATFontNeedsOffsets;
TabHelper: TATStringTabHelper;
LineIndex: integer;
CharIndexInLine: integer;
CharSize: TPoint;
MainTextArea: boolean;
CharsSkipped: integer;
Expand Down Expand Up @@ -883,7 +884,7 @@ procedure CanvasTextOut(C: TCanvas; APosX, APosY: integer; AText: atString;
if AProps.ShowUnprintedSpacesOnlyInSelection then
begin
for i:= 1 to Length(AText) do
if AProps.DetectIsPosSelected(i-1, AProps.LineIndex) then
if AProps.DetectIsPosSelected(i-2+AProps.CharIndexInLine, AProps.LineIndex) then
DoPaintUnprintedChar(C, AText[i], i, ListInt, Point(APosX, APosY), AProps.CharSize, AProps.ColorUnprintedFont);
end
else
Expand Down

0 comments on commit b5fb97c

Please sign in to comment.