Problems with cyrillic symbols in SynEditHighlighter.pas
Posted: 06 Aug 2009 16:31
Please, fix function TSynCustomHighlighter.IsIdentChar in SynEditHighlighter.pas (Unicode SynEdit 2009-06-14 from CVS synedit.sourceforge.net).
Original code:
Procedure SynEdit1.ExecuteCommand(198, 'A', @SynEdit1.Lines) (select word at caret) not works for cyrillic words with this code, when using highlighters. This procedure works, when SynEdit1.Highlighter := nil;
My code to fix the bug with cyrillic symbols/words:
Maybe, it is bad solution. I'm not good programmer.
PS: Sorry for my bad english.
Original code:
Code: Select all
function TSynCustomHighlighter.IsIdentChar(AChar: WideChar): Boolean;
begin
case AChar of
'_', '0'..'9', 'A'..'Z', 'a'..'z':
Result := True;
else
Result := False;
end;
end;
My code to fix the bug with cyrillic symbols/words:
Code: Select all
function TSynCustomHighlighter.IsIdentChar(AChar: WideChar): Boolean;
begin
Result := (AChar >= #33) and not IsWordBreakChar(AChar)
end;
PS: Sorry for my bad english.