From cb00cac54dc015309b20f6781a8eaca1f89ea7cc Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Sat, 28 Jul 2007 06:55:28 +0000 Subject: [PATCH] Patch from Mattias that fixes SynEdit unicode text selection git-svn-id: trunk@11651 - --- components/synedit/synedit.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/synedit/synedit.pp b/components/synedit/synedit.pp index 4ea68c2981..17de5ed1a6 100644 --- a/components/synedit/synedit.pp +++ b/components/synedit/synedit.pp @@ -3439,17 +3439,17 @@ var SetDrawingColors(FALSE); rcToken.Right := ScreenColumnToXValue(nSelStart); with TokenAccu do - PaintToken(p,Len,CharsBefore,C1Phys,nC1,SelStartLogical); + PaintToken(p,Len,CharsBefore,C1Phys,nC1,SelStartLogical-1); end; // selected part of the token SetDrawingColors(TRUE); nC1Sel := Max(SelStartLogical, nC1); - nC2Sel := Min(SelEndLogical, nC2); + nC2Sel := Min(SelEndLogical, nC2+1); C2Phys := Min(LastCol, TokenAccu.PhysicalEndPos+1); C1SelPhys := Max(nSelStart, C1Phys); C2SelPhys := Min(nSelEnd, C2Phys); rcToken.Right := ScreenColumnToXValue(C2SelPhys); - with TokenAccu do PaintToken(p,Len,CharsBefore,C1SelPhys,nC1Sel,nC2Sel); + with TokenAccu do PaintToken(p,Len,CharsBefore,C1SelPhys,nC1Sel,nC2Sel-1); // second unselected part of the token if bU2 then begin SetDrawingColors(FALSE);