diff --git a/components/synedit/syneditmarkupselection.pp b/components/synedit/syneditmarkupselection.pp index 8b7dfabd10..a3f1707f6c 100644 --- a/components/synedit/syneditmarkupselection.pp +++ b/components/synedit/syneditmarkupselection.pp @@ -130,7 +130,7 @@ begin end; end; MarkupInfo.StartX := nSelStart; - MarkupInfo.EndX := nSelEnd; + MarkupInfo.EndX := nSelEnd-1; end; function TSynEditMarkupSelection.GetMarkupAttributeAtRowCol(const aRow, aCol : Integer) : TSynSelectedColor;