diff --git a/Source/SynEdit.pas b/Source/SynEdit.pas index 60521b6..a592ccd 100644 --- a/Source/SynEdit.pas +++ b/Source/SynEdit.pas @@ -8877,9 +8877,9 @@ function TCustomSynEdit.GetWordAtRowCol(XY: TBufferCoord): string; begin Line := Lines[XY.Line - 1]; Len := Length(Line); - if (Len > 0) and InRange(XY.Char, 1, Len + 1) then + Start := XY.Char; + if (Len > 0) and InRange(XY.Char, 1, Len + 1) and IsIdentChar(Line[Start]) then begin - Start := XY.Char; while (Start > 1) and IsIdentChar(Line[Start - 1]) do Dec(Start);