EditorOptions: preview syn click, improved finding char under mouse

git-svn-id: trunk@21193 -
This commit is contained in:
martin 2009-08-12 13:23:08 +00:00
parent c38d807c36
commit 4a7a1e4c5d

View File

@ -311,7 +311,7 @@ var
AddAttr: TAdditionalHilightAttribute;
NewNode: TTreeNode;
begin
MouseXY := Point(X, Y);
MouseXY := Point(X - (ColorPreview.CharWidth div 2), Y);
XY := ColorPreview.PixelsToRowColumn(MouseXY);
NewNode := nil;
// Gutter Colors
@ -341,7 +341,7 @@ begin
AddAttr := EditorOpts.HighlighterList[CurLanguageID].SampleLineToAddAttr(XY.Y);
if AddAttr = ahaFoldedCode then begin
if (XY.X >= Length(ColorPreview.Lines[XY.Y-1]) + 4) and
(XY.X <= Length(ColorPreview.Lines[XY.Y-1]) + 7) then
(XY.X <= Length(ColorPreview.Lines[XY.Y-1]) + 6) then
NewNode := ColorElementTree.Items.FindNodeWithText(COLOR_NODE_PREFIX+AdditionalHighlightAttributes[AddAttr]);
end
else if AddAttr <> ahaNone then