Skip to content

Commit

Permalink
Fixed issue #690
Browse files Browse the repository at this point in the history
  • Loading branch information
pyscripter committed Nov 2, 2017
1 parent beb0d0d commit a0d9791
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
6 changes: 3 additions & 3 deletions Install/PyScripter.iss
Expand Up @@ -3,8 +3,8 @@

[Setup]
AppName=PyScripter
AppVersion=3.0.1
AppVerName=PyScripter 3.0.1
AppVersion=3.0.2
AppVerName=PyScripter 3.0.2
AppPublisher=PyScripter
AppPublisherURL=https://sourceforge.net/projects/pyscripter/
AppSupportURL=https://github.com/pyscripter/pyscripter
Expand All @@ -14,7 +14,7 @@ DefaultGroupName=PyScripter
InfoBeforeFile=BeforeInstallPyScripter.txt
InfoAfterFile=AfterInstallPyScripter.txt
OutputDir=Output
OutputBaseFilename=PyScripter-v3.0.1-Setup
OutputBaseFilename=PyScripter-v3.0.2-Setup
Compression=lzma/Max
SolidCompression=true
ChangesAssociations=true
Expand Down
6 changes: 3 additions & 3 deletions Install/PyScripter_x64.iss
Expand Up @@ -3,8 +3,8 @@

[Setup]
AppName=PyScripter
AppVersion=3.0.1
AppVerName=PyScripter 3.0.1
AppVersion=3.0.2
AppVerName=PyScripter 3.0.2
AppPublisher=PyScripter
AppPublisherURL=https://sourceforge.net/projects/pyscripter/
AppSupportURL=https://github.com/pyscripter/pyscripter
Expand All @@ -14,7 +14,7 @@ DefaultGroupName=PyScripter-x64
InfoBeforeFile=BeforeInstallPyScripter-x64.txt
InfoAfterFile=AfterInstallPyScripter-x64.txt
OutputDir=Output
OutputBaseFilename=PyScripter-v3.0.1-x64-Setup
OutputBaseFilename=PyScripter-v3.0.2-x64-Setup
Compression=lzma/Max
SolidCompression=true
ChangesAssociations=true
Expand Down
17 changes: 12 additions & 5 deletions dmCommands.pas
Expand Up @@ -89,6 +89,7 @@ TPythonIDEOptions = class(TBaseOptions)
fFileTemplateForNewScripts : string;
fAutoCompletionFont : TFont;
fHighlightSelectedWord : Boolean;
fHighlightSelectedWordColor : TColor;
fUsePythonColorsInIDE : Boolean;
fFileChangeNotification : TFileChangeNotificationType;
fCodeCompletionCaseSensitive : Boolean;
Expand Down Expand Up @@ -211,6 +212,8 @@ TPythonIDEOptions = class(TBaseOptions)
write SetAutoCompletionFont;
property HighlightSelectedWord : boolean read fHighlightSelectedWord
write fHighlightSelectedWord;
property HighlightSelectedWordColor : TColor read fHighlightSelectedWordColor
write fHighlightSelectedWordColor;
property UsePythonColorsInIDE : boolean read fUsePythonColorsInIDE
write fUsePythonColorsInIDE;
property FileChangeNotification : TFileChangeNotificationType read fFileChangeNotification
Expand Down Expand Up @@ -651,6 +654,7 @@ procedure TPythonIDEOptions.Assign(Source: TPersistent);
Self.fFileTemplateForNewScripts := FileTemplateForNewScripts;
Self.fAutoCompletionFont.Assign(AutoCompletionFont);
Self.fHighlightSelectedWord := HighlightSelectedWord;
Self.fHighlightSelectedWordColor := HighlightSelectedWordColor;
Self.fUsePythonColorsInIDE := UsePythonColorsInIDE;
Self.fFileChangeNotification := FileChangeNotification;
Self.fCodeCompletionCaseSensitive := CodeCompletionCaseSensitive;
Expand Down Expand Up @@ -735,6 +739,7 @@ constructor TPythonIDEOptions.Create;
fAutoCompletionFont := TFont.Create;
fAutoCompletionFont.Assign(Application.DefaultFont);
fHighlightSelectedWord := True;
fHighlightSelectedWordColor := clYellow;
fUsePythonColorsInIDE := False;
fFileChangeNotification := fcnNoMappedDrives;
fCodeCompletionCaseSensitive := True;
Expand Down Expand Up @@ -2290,7 +2295,7 @@ procedure TCommandsDataModule.actIDEOptionsExecute(Sender: TObject);
end;
with Categories[4] do begin
DisplayName := _('Editor');
SetLength(Options, 17);
SetLength(Options, 18);
Options[0].PropertyName := 'RestoreOpenFiles';
Options[0].DisplayName := _('Restore open files');
Options[1].PropertyName := 'SearchTextAtCaret';
Expand Down Expand Up @@ -2321,10 +2326,12 @@ procedure TCommandsDataModule.actIDEOptionsExecute(Sender: TObject);
Options[13].DisplayName := _('Auto-hide find toolbar');
Options[14].PropertyName := 'HighlightSelectedWord';
Options[14].DisplayName := _('Highlight selected word');
Options[15].PropertyName := 'DisplayPackageNames';
Options[15].DisplayName := _('Display package names in editor tabs');
Options[16].PropertyName := 'CheckSyntaxLineLimit';
Options[16].DisplayName := _('File line limit for syntax check as you type');
Options[15].PropertyName := 'HighlightSelectedWordColor';
Options[15].DisplayName := _('Highlight color of selected word');
Options[16].PropertyName := 'DisplayPackageNames';
Options[16].DisplayName := _('Display package names in editor tabs');
Options[17].PropertyName := 'CheckSyntaxLineLimit';
Options[17].DisplayName := _('File line limit for syntax check as you type');
end;
with Categories[5] do begin
DisplayName := _('Code Completion');
Expand Down
4 changes: 2 additions & 2 deletions uSearchHighlighter.pas
Expand Up @@ -42,7 +42,7 @@ THighlightSearchPlugin = class(TSynEditPlugin)

implementation
Uses
Math, uEditAppIntfs, frmEditor;
Math, uEditAppIntfs, frmEditor, dmCommands;

{ THighlightSearchPlugin }

Expand All @@ -56,7 +56,7 @@ procedure THighlightSearchPlugin.AfterPaint(ACanvas: TCanvas;
begin
if StartXY.Char < EndXY.Char then begin
Pix := fSynEdit.RowColumnToPixels(fSynEdit.BufferToDisplayPos(StartXY));
ACanvas.Brush.Color := clYellow;
ACanvas.Brush.Color := CommandsDataModule.PyIDEOptions.HighlightSelectedWordColor;
ACanvas.Brush.Style := bsSolid;
SetTextCharacterExtra(ACanvas.Handle, fSynEdit.CharWidth - ACanvas.TextWidth('W'));
S := Copy(fSynEdit.Lines[StartXY.Line-1],
Expand Down

0 comments on commit a0d9791

Please sign in to comment.