Skip to content

Commit

Permalink
fixing Alexey-T/CudaText#5785 , now for multiline tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-T committed Dec 17, 2024
1 parent 4b5a8d3 commit 0a70b9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions econtrol/ec_syntanal.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4931,7 +4931,7 @@ function TecClientSyntAnalyzer.CloseAtEnd(AStartTagIdx: integer): Boolean;
if Style=nil then Break;
if Style.TokenKind<>etkComment then Break;
if Tags[NTokenIndex].Range.PointStart.Y =
Tags[NTokenIndex-1].Range.PointStart.Y then Break;
Tags[NTokenIndex-1].Range.PointEnd.Y then Break;
// fix bug similar to CudaText issue #5785, but at the end of file
// see also another place for #5785
Dec(NTokenIndex);
Expand Down Expand Up @@ -4968,7 +4968,7 @@ function TecClientSyntAnalyzer.CloseAtEnd(AStartTagIdx: integer): Boolean;
// skip token only if it starts on separate line, CudaText issue #5785
// see also another place for #5785
if Tags[NTokenIndex].Range.PointStart.Y =
Tags[NTokenIndex-1].Range.PointStart.Y then Break;
Tags[NTokenIndex-1].Range.PointEnd.Y then Break;
Dec(NTokenIndex)
until False;
Range.EndIdx := NTokenIndex;
Expand Down

0 comments on commit 0a70b9e

Please sign in to comment.