mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 22:00:38 +02:00
EditorOptions: preview syn click, improved finding char under mouse
git-svn-id: trunk@21193 -
This commit is contained in:
parent
c38d807c36
commit
4a7a1e4c5d
@ -311,7 +311,7 @@ var
|
|||||||
AddAttr: TAdditionalHilightAttribute;
|
AddAttr: TAdditionalHilightAttribute;
|
||||||
NewNode: TTreeNode;
|
NewNode: TTreeNode;
|
||||||
begin
|
begin
|
||||||
MouseXY := Point(X, Y);
|
MouseXY := Point(X - (ColorPreview.CharWidth div 2), Y);
|
||||||
XY := ColorPreview.PixelsToRowColumn(MouseXY);
|
XY := ColorPreview.PixelsToRowColumn(MouseXY);
|
||||||
NewNode := nil;
|
NewNode := nil;
|
||||||
// Gutter Colors
|
// Gutter Colors
|
||||||
@ -341,7 +341,7 @@ begin
|
|||||||
AddAttr := EditorOpts.HighlighterList[CurLanguageID].SampleLineToAddAttr(XY.Y);
|
AddAttr := EditorOpts.HighlighterList[CurLanguageID].SampleLineToAddAttr(XY.Y);
|
||||||
if AddAttr = ahaFoldedCode then begin
|
if AddAttr = ahaFoldedCode then begin
|
||||||
if (XY.X >= Length(ColorPreview.Lines[XY.Y-1]) + 4) and
|
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]);
|
NewNode := ColorElementTree.Items.FindNodeWithText(COLOR_NODE_PREFIX+AdditionalHighlightAttributes[AddAttr]);
|
||||||
end
|
end
|
||||||
else if AddAttr <> ahaNone then
|
else if AddAttr <> ahaNone then
|
||||||
|
Loading…
Reference in New Issue
Block a user