diff --git a/Projects/Simba/framescript.pas b/Projects/Simba/framescript.pas index 8ce4b2266..3de526e18 100644 --- a/Projects/Simba/framescript.pas +++ b/Projects/Simba/framescript.pas @@ -767,10 +767,14 @@ constructor TScriptFrame.Create(TheOwner: TComponent); OwnerSheet.Caption:= ScriptName; SynEdit.Enabled := True; // For some reason we need this? - + SynEdit.Highlighter := SimbaForm.CurrHighlighter; - SynEdit.Options := SynEdit.Options + [eoTabIndent, eoKeepCaretX, eoDragDropEditing] - [eoSmartTabs]; + SynEdit.Options := SynEdit.Options + [eoTabIndent, eoKeepCaretX, eoDragDropEditing, eoScrollPastEof] - [eoSmartTabs]; SynEdit.Options2 := SynEdit.Options2 + [eoCaretSkipsSelection]; + + if not SimbaSettings.SourceEditor.CaretPastEOL.GetDefValue(True) then + SynEdit.Options := SynEdit.Options - [eoScrollPastEol, eoTrimTrailingSpaces]; + SynEdit.Gutter.CodeFoldPart.MarkupInfo.Background:= clWhite; for i := low(i) to high(i) do if i in AdditionalFolds then diff --git a/Projects/Simba/newsimbasettings.pas b/Projects/Simba/newsimbasettings.pas index 04b5b5322..8b248af4e 100644 --- a/Projects/Simba/newsimbasettings.pas +++ b/Projects/Simba/newsimbasettings.pas @@ -198,6 +198,7 @@ TInterpreterSection = class(TSection) TSourceEditorSection = class(TSection) DefScriptPath: TFileSetting; LazColors: TBooleanSetting; + CaretPastEOL: TBooleanSetting; Font: TFontSetting; end; @@ -883,6 +884,7 @@ procedure GetScriptManagerFile(obj: TObject); begin TStringSetting(obj).Value := procedure GetScriptManagerFirstRun(obj: TObject); begin TBooleanSetting(obj).Value := True; end; procedure GetSourceEditorLazColors(obj: TObject); begin TBooleanSetting(obj).Value := True; end; +procedure GetSourceEditorCaretPastEOL(obj: TObject); begin TBooleanSetting(obj).Value := True; end; procedure GetExtensionsFileExtension(obj: TObject); begin TStringSetting(obj).Value := 'sex'; end; @@ -969,6 +971,8 @@ constructor TSimbaSettings.Create; SourceEditor.DefScriptPath.onDefault := @GetDefScriptPath; SourceEditor.LazColors := SourceEditor.AddChild(TBooleanSetting.Create(ssSourceEditorLazColors)) as TBooleanSetting; SourceEditor.LazColors.onDefault := @GetSourceEditorLazColors; + SourceEditor.CaretPastEOL := SourceEditor.AddChild(TBooleanSetting.Create(ssSourceEditorCaretPastEOL)) as TBooleanSetting; + SourceEditor.CaretPastEOL.onDefault := @GetSourceEditorCaretPastEOL; SourceEditor.Font := SourceEditor.AddChild(TFontSetting.Create(ssSourceEditorFont)) as TFontSetting; News := AddChild(TNewsSection.Create()) as TNewsSection; diff --git a/Projects/Simba/settings_const.inc b/Projects/Simba/settings_const.inc index d96e000f0..b496087ba 100644 --- a/Projects/Simba/settings_const.inc +++ b/Projects/Simba/settings_const.inc @@ -56,6 +56,7 @@ ssCodeCompletionShowAutomatically = ssSettings + ssCodeInsight + 'CodeCompletion ssShowBalloonHints = ssSettings + 'ShowBalloonHints'; ssSourceEditorLazColors = ssSettings + ssSourceEditor + 'LazColors'; +ssSourceEditorCaretPastEOL = ssSettings + ssSourceEditor + 'CaretPastEOL'; ssSourceEditorFont = ssSettings + ssSourceEditor + 'Font/'; ssSourceEditorDefScriptPath = ssSettings + ssSourceEditor + 'DefScriptPath'; diff --git a/Projects/Simba/simbasettingssimple.lfm b/Projects/Simba/simbasettingssimple.lfm index f12baf7ae..282315d6b 100644 --- a/Projects/Simba/simbasettingssimple.lfm +++ b/Projects/Simba/simbasettingssimple.lfm @@ -1,20 +1,20 @@ object SettingsSimpleForm: TSettingsSimpleForm - Left = 696 - Height = 416 - Top = 270 + Left = 277 + Height = 500 + Top = 303 Width = 457 ActiveControl = SettingsTabsPanel Caption = 'Settings' - ClientHeight = 416 + ClientHeight = 500 ClientWidth = 457 - Constraints.MaxHeight = 416 + Constraints.MaxHeight = 500 Constraints.MaxWidth = 457 - Constraints.MinHeight = 416 + Constraints.MinHeight = 500 Constraints.MinWidth = 457 OnCreate = FormCreate OnShow = FormShow Position = poMainFormCenter - LCLVersion = '0.9.30.4' + LCLVersion = '1.4.0.1' object PgControlAdvanced: TPageControl Left = 8 Height = 304 @@ -28,14 +28,14 @@ object SettingsSimpleForm: TSettingsSimpleForm Caption = 'Paths' ChildSizing.TopBottomSpacing = 10 ChildSizing.VerticalSpacing = 10 - ClientHeight = 271 - ClientWidth = 434 + ClientHeight = 276 + ClientWidth = 432 object PathsTreeView: TTreeView Left = 13 Height = 239 Top = 13 Width = 400 - DefaultItemHeight = 17 + DefaultItemHeight = 18 TabOrder = 0 Items.Data = { F9FFFFFF020005000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF010000000000 @@ -57,7 +57,7 @@ object SettingsSimpleForm: TSettingsSimpleForm object ButtonOK: TButton Left = 280 Height = 25 - Top = 384 + Top = 464 Width = 75 Caption = 'OK' OnClick = ButtonOKClick @@ -66,7 +66,7 @@ object SettingsSimpleForm: TSettingsSimpleForm object ButtonCancel: TButton Left = 368 Height = 25 - Top = 384 + Top = 464 Width = 75 Caption = 'Cancel' OnClick = ButtonCancelClick @@ -140,49 +140,49 @@ object SettingsSimpleForm: TSettingsSimpleForm Caption = 'Updater' ChildSizing.TopBottomSpacing = 10 ChildSizing.VerticalSpacing = 10 - ClientHeight = 271 - ClientWidth = 434 + ClientHeight = 276 + ClientWidth = 432 object UpdaterGroup: TGroupBox Left = 12 Height = 232 Top = 8 Width = 409 - ClientHeight = 228 + ClientHeight = 212 ClientWidth = 405 TabOrder = 0 object CheckForUpdatesBox: TCheckBox Left = 16 - Height = 22 + Height = 19 Top = 13 - Width = 140 + Width = 116 Caption = 'Check for updates' TabOrder = 0 end object Label1: TLabel Left = 16 - Height = 16 + Height = 15 Top = 50 - Width = 149 + Width = 121 Caption = 'Check every (minutes):' ParentColor = False end object UpdateMinutesEdit: TEdit Left = 160 - Height = 25 + Height = 23 Top = 47 Width = 80 TabOrder = 1 end object UpdaterURL: TEdit Left = 160 - Height = 25 + Height = 23 Top = 80 Width = 240 TabOrder = 2 end object UpdaterURLVersion: TEdit Left = 160 - Height = 25 + Height = 23 Top = 110 Width = 240 TabOrder = 3 @@ -190,25 +190,25 @@ object SettingsSimpleForm: TSettingsSimpleForm end object UpdaterURLLabel: TLabel Left = 16 - Height = 16 + Height = 15 Top = 85 - Width = 82 + Width = 66 Caption = 'Updater URL' ParentColor = False end object UpdaterURLVersionLabel: TLabel Left = 16 - Height = 16 + Height = 15 Top = 115 - Width = 133 + Width = 108 Caption = 'Updater Version URL' ParentColor = False end object AutomaticallyUpdateBox: TCheckBox Left = 16 - Height = 22 + Height = 19 Top = 144 - Width = 167 + Width = 139 Caption = 'Automatically update?' TabOrder = 4 end @@ -232,7 +232,7 @@ object SettingsSimpleForm: TSettingsSimpleForm ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 88 + ClientHeight = 72 ClientWidth = 404 Items.Strings = ( 'PascalScript' @@ -244,17 +244,17 @@ object SettingsSimpleForm: TSettingsSimpleForm end object PgControlEnvironment: TPageControl Left = 8 - Height = 304 + Height = 384 Top = 72 Width = 440 - ActivePage = tsTabs - TabIndex = 0 + ActivePage = tsEditor + TabIndex = 1 TabOrder = 3 Visible = False object tsTabs: TTabSheet Caption = 'Tabs' - ClientHeight = 271 - ClientWidth = 434 + ClientHeight = 356 + ClientWidth = 432 object TabSettingsCheckBoxes: TCheckGroup Left = 12 Height = 167 @@ -270,6 +270,8 @@ object SettingsSimpleForm: TSettingsSimpleForm ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 + ClientHeight = 147 + ClientWidth = 399 Items.Strings = ( 'Open Next on Close' 'Open Script in new Tab' @@ -283,8 +285,8 @@ object SettingsSimpleForm: TSettingsSimpleForm end object tsEditor: TTabSheet Caption = 'Editor' - ClientHeight = 271 - ClientWidth = 434 + ClientHeight = 356 + ClientWidth = 432 object CodeToolsCheckBoxes: TCheckGroup Left = 13 Height = 71 @@ -300,6 +302,8 @@ object SettingsSimpleForm: TSettingsSimpleForm ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 + ClientHeight = 51 + ClientWidth = 399 Items.Strings = ( 'Automatically show hints' 'Automatically show completion' @@ -324,6 +328,8 @@ object SettingsSimpleForm: TSettingsSimpleForm ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 + ClientHeight = 51 + ClientWidth = 399 Items.Strings = ( 'Show history on pick' 'Add to history on pick' @@ -335,43 +341,51 @@ object SettingsSimpleForm: TSettingsSimpleForm end object GroupBox2: TGroupBox Left = 12 - Height = 84 + Height = 108 Top = 180 Width = 403 Caption = 'Source Editor' - ClientHeight = 67 + ClientHeight = 88 ClientWidth = 399 TabOrder = 2 object HighlightLazColours: TCheckBox Left = 14 - Height = 22 + Height = 19 Top = 8 - Width = 145 + Width = 116 Caption = 'Use Lazarus colors' TabOrder = 0 end object Label2: TLabel Left = 14 - Height = 16 - Top = 32 - Width = 90 + Height = 15 + Top = 60 + Width = 73 Caption = 'Default script:' ParentColor = False end object DefaultScriptedit: TEdit Left = 110 - Height = 25 - Top = 28 + Height = 23 + Top = 56 Width = 184 TabOrder = 1 Text = 'path' end + object CaretPastEOL: TCheckBox + Left = 14 + Height = 19 + Top = 32 + Width = 97 + Caption = 'Caret past EOL' + TabOrder = 2 + end end end object tsOther: TTabSheet Caption = 'Other' - ClientHeight = 271 - ClientWidth = 434 + ClientHeight = 356 + ClientWidth = 432 object EnvOther: TCheckGroup Left = 13 Height = 166 @@ -386,6 +400,8 @@ object SettingsSimpleForm: TSettingsSimpleForm ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 + ClientHeight = 146 + ClientWidth = 398 Items.Strings = ( 'Tray always Visible' 'Show Function List on Start' @@ -407,7 +423,7 @@ object SettingsSimpleForm: TSettingsSimpleForm Masked = True Width = 32 left = 32 - top = 369 + top = 456 Bitmap = { 4C69050000002000000020000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 diff --git a/Projects/Simba/simbasettingssimple.pas b/Projects/Simba/simbasettingssimple.pas index 4f0a201ab..6cf85a21f 100644 --- a/Projects/Simba/simbasettingssimple.pas +++ b/Projects/Simba/simbasettingssimple.pas @@ -32,8 +32,9 @@ X Add to history on pick X Source Editor - X LazColors (boolean) + X LazColors (Boolean) X Default Script (Path) + X CaretPastEOL (Boolean) X Tray: X Always Visible @@ -72,6 +73,7 @@ TSettingsSimpleForm = class(TForm) ButtonCancel: TButton; CheckForUpdatesBox: TCheckBox; AutomaticallyUpdateBox: TCheckBox; + CaretPastEOL: TCheckBox; UpdaterURLLabel: TLabel; UpdaterURLVersionLabel: TLabel; UpdaterURLVersion: TEdit; @@ -184,6 +186,7 @@ procedure TSettingsSimpleForm.ButtonOKClick(Sender: TObject); // Source Editor SimbaSettings.SourceEditor.LazColors.Value := HighlightLazColours.Checked; SimbaSettings.SourceEditor.DefScriptPath.Value := DefaultScriptedit.Text; + SimbaSettings.SourceEditor.CaretPastEOL.Value := CaretPastEOL.Checked; // Other SimbaSettings.Tray.AlwaysVisible.Value := EnvOther.Checked[0]; @@ -265,7 +268,8 @@ procedure TSettingsSimpleForm.FormShow(Sender: TObject); // Source Editor HighlightLazColours.Checked := SimbaSettings.SourceEditor.LazColors.Value; DefaultScriptedit.Text := SimbaSettings.SourceEditor.DefScriptPath.Value; - + CaretPastEOL.Checked := SimbaSettings.SourceEditor.CaretPastEOL.Value; + // Other EnvOther.Checked[0] := SimbaSettings.Tray.AlwaysVisible.Value; EnvOther.Checked[1] := SimbaSettings.CodeInsight.FunctionList.ShowOnStart.Value; @@ -302,7 +306,6 @@ procedure TSettingsSimpleForm.FormShow(Sender: TObject); SettingsTabState[2] := 0; end; - // Part of Faux Tabs - Controls switching of tabs procedure TSettingsSimpleForm.SwitchSettingsTab(NewTab: Integer); var i: Integer; diff --git a/Projects/Simba/simbaunit.lfm b/Projects/Simba/simbaunit.lfm index 027c20ad1..8af02cf61 100644 --- a/Projects/Simba/simbaunit.lfm +++ b/Projects/Simba/simbaunit.lfm @@ -1,12 +1,12 @@ object SimbaForm: TSimbaForm - Left = 411 - Height = 623 + Left = 49 + Height = 671 Top = 77 Width = 660 ActiveControl = ScriptPanel AllowDropFiles = True Caption = 'THA FUKING Simba' - ClientHeight = 603 + ClientHeight = 651 ClientWidth = 660 KeyPreview = True Menu = MainMenu @@ -16,7 +16,7 @@ object SimbaForm: TSimbaForm OnDropFiles = FormDropFiles OnHide = doOnHide OnShortCut = FormShortCuts - LCLVersion = '1.0.10.0' + LCLVersion = '1.4.0.1' Visible = True object ToolBar1: TToolBar Left = 0 @@ -54,6 +54,7 @@ object SimbaForm: TSimbaForm end object ToolButton1: TToolButton Left = 297 + Height = 22 Top = 2 Width = 5 Caption = 'ToolButton1' @@ -73,6 +74,7 @@ object SimbaForm: TSimbaForm end object ToolButton4: TToolButton Left = 348 + Height = 22 Top = 2 Width = 5 Caption = 'ToolButton4' @@ -102,6 +104,7 @@ object SimbaForm: TSimbaForm end object ToolButton8: TToolButton Left = 445 + Height = 22 Top = 2 Width = 5 Caption = 'ToolButton8' @@ -133,6 +136,7 @@ object SimbaForm: TSimbaForm end object ToolButton2: TToolButton Left = 149 + Height = 22 Top = 2 Width = 5 Caption = 'ToolButton2' @@ -161,6 +165,7 @@ object SimbaForm: TSimbaForm end object ToolButton3: TToolButton Left = 519 + Height = 22 Top = 2 Width = 5 Caption = 'ToolButton3' @@ -195,6 +200,7 @@ object SimbaForm: TSimbaForm end object ToolButton9: TToolButton Left = 223 + Height = 22 Top = 2 Width = 5 Caption = 'ToolButton9' @@ -215,6 +221,7 @@ object SimbaForm: TSimbaForm end object ToolButton6: TToolButton Left = 47 + Height = 22 Top = 2 Width = 10 Caption = 'ToolButton6' @@ -237,7 +244,7 @@ object SimbaForm: TSimbaForm object StatusBar: TStatusBar Left = 0 Height = 23 - Top = 580 + Top = 628 Width = 660 Panels = < item @@ -259,7 +266,7 @@ object SimbaForm: TSimbaForm object PanelMemo: TPanel Left = 0 Height = 154 - Top = 426 + Top = 474 Width = 660 Align = alBottom ClientHeight = 154 @@ -283,19 +290,19 @@ object SimbaForm: TSimbaForm Cursor = crVSplit Left = 0 Height = 5 - Top = 421 + Top = 469 Width = 660 Align = alBottom ResizeAnchor = akBottom end object ScriptPanel: TPanel Left = 0 - Height = 397 + Height = 445 Top = 24 Width = 660 Align = alClient BevelOuter = bvNone - ClientHeight = 397 + ClientHeight = 445 ClientWidth = 660 DockSite = True TabOrder = 4 @@ -303,7 +310,7 @@ object SimbaForm: TSimbaForm OnDockOver = ScriptPanelDockOver object PageControl1: TPageControl Left = 155 - Height = 362 + Height = 410 Top = 0 Width = 350 Align = alClient @@ -321,7 +328,7 @@ object SimbaForm: TSimbaForm object SearchPanel: TPanel Left = 0 Height = 35 - Top = 362 + Top = 410 Width = 660 Align = alBottom BevelOuter = bvSpace @@ -411,7 +418,6 @@ object SimbaForm: TSimbaForm 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000 } - NumGlyphs = 0 OnClick = SpeedButtonSearchClick end object LabeledEditSearch: TLabeledEdit @@ -424,10 +430,10 @@ object SimbaForm: TSimbaForm EditLabel.AnchorSideRight.Control = LabeledEditSearch EditLabel.AnchorSideBottom.Control = LabeledEditSearch EditLabel.AnchorSideBottom.Side = asrBottom - EditLabel.Left = 71 - EditLabel.Height = 16 - EditLabel.Top = 9 - EditLabel.Width = 30 + EditLabel.Left = 72 + EditLabel.Height = 15 + EditLabel.Top = 10 + EditLabel.Width = 29 EditLabel.Caption = 'Find: ' EditLabel.ParentColor = False LabelPosition = lpLeft @@ -450,21 +456,22 @@ object SimbaForm: TSimbaForm end object SplitterFunctionList: TSplitter Left = 150 - Height = 362 + Height = 410 Top = 0 Width = 5 OnCanResize = SplitterFunctionListCanResize Visible = False end inline frmFunctionList: TFunctionListFrame - Height = 362 + Height = 410 Width = 150 - ClientHeight = 362 + ClientHeight = 410 ClientWidth = 150 OnEndDock = nil TabOrder = 3 inherited FunctionList: TTreeView - Height = 316 + Height = 365 + Top = 19 Width = 150 HideSelection = True Images = nil @@ -476,10 +483,11 @@ object SimbaForm: TSimbaForm Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips] end inherited FunctionListLabel: TLabel + Height = 15 Width = 146 end inherited Panel1: TPanel - Top = 336 + Top = 384 Width = 150 ClientWidth = 150 inherited ClearSearch: TSpeedButton @@ -495,7 +503,7 @@ object SimbaForm: TSimbaForm end object NotesMemo: TMemo Left = 510 - Height = 362 + Height = 410 Top = 0 Width = 150 Align = alRight @@ -506,7 +514,7 @@ object SimbaForm: TSimbaForm end object NotesSplitter: TSplitter Left = 505 - Height = 362 + Height = 410 Top = 0 Width = 5 Align = alRight