diff --git a/DocGen/images/multicaret-homeend.gif b/DocGen/images/multicaret-homeend.gif new file mode 100644 index 000000000..8990103d8 Binary files /dev/null and b/DocGen/images/multicaret-homeend.gif differ diff --git a/DocGen/images/multicaret-individual.gif b/DocGen/images/multicaret-individual.gif new file mode 100644 index 000000000..93c65089a Binary files /dev/null and b/DocGen/images/multicaret-individual.gif differ diff --git a/DocGen/images/multicaret.gif b/DocGen/images/multicaret.gif new file mode 100644 index 000000000..b9a40ea22 Binary files /dev/null and b/DocGen/images/multicaret.gif differ diff --git a/DocGen/source/simba/index.rst b/DocGen/source/simba/index.rst index c660d86b6..7b0bdaa4d 100644 --- a/DocGen/source/simba/index.rst +++ b/DocGen/source/simba/index.rst @@ -4,4 +4,5 @@ Simba .. toctree:: :maxdepth: 2 - codetools.rst \ No newline at end of file + codetools.rst + multicaret.rst \ No newline at end of file diff --git a/DocGen/source/simba/multicaret.rst b/DocGen/source/simba/multicaret.rst new file mode 100644 index 000000000..d5c711041 --- /dev/null +++ b/DocGen/source/simba/multicaret.rst @@ -0,0 +1,22 @@ +########### +Multi Caret +########### + +The editor allows multiple carets with pressing :code:`Shift`, :code:`Control` and :code:`Left Click`. + +Individually adding carets +"""""""""""""""""""""""""" + +.. image:: ../../images/multicaret-individual.gif + +Adding carets to a selection +"""""""""""""""""""""""""""" + +.. image:: ../../images/multicaret.gif + +Moving to start or end of line +"""""""""""""""""""""""""""""" + +Press the :code:`Home/End` key to move to the :code:`Start/End` of the lines. + +.. image:: ../../images/multicaret-homeend.gif diff --git a/Source/ide/simba.form_findinfiles.lfm b/Source/ide/simba.form_findinfiles.lfm index 559168c41..e66917c8b 100644 --- a/Source/ide/simba.form_findinfiles.lfm +++ b/Source/ide/simba.form_findinfiles.lfm @@ -10,10 +10,9 @@ object SimbaFindInFilesForm: TSimbaFindInFilesForm OnClose = FormClose OnCreate = FormCreate OnDestroy = FormDestroy - OnShow = FormShow Position = poMainFormCenter ShowInTaskBar = stAlways - LCLVersion = '3.0.0.3' + LCLVersion = '3.4.0.0' object PanelMatches: TPanel Left = 12 Height = 167 @@ -30,7 +29,7 @@ object SimbaFindInFilesForm: TSimbaFindInFilesForm TabOrder = 0 object MatchesLabel: TLabel Left = 0 - Height = 25 + Height = 20 Top = 7 Width = 726 Align = alTop diff --git a/Source/ide/simba.form_findinfiles.pas b/Source/ide/simba.form_findinfiles.pas index 7f0601e34..bac25f1d5 100644 --- a/Source/ide/simba.form_findinfiles.pas +++ b/Source/ide/simba.form_findinfiles.pas @@ -53,7 +53,6 @@ TSimbaFindInFilesForm = class(TForm) procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure DialogSelectDirClose(Sender: TObject); - procedure FormShow(Sender: TObject); private Searcher: TSynEditSearch; ButtonFind: TSimbaButton; @@ -262,13 +261,6 @@ procedure TSimbaFindInFilesForm.DialogSelectDirClose(Sender: TObject); EditLocation.Edit.Text := DialogSelectDir.FileName; end; -procedure TSimbaFindInFilesForm.FormShow(Sender: TObject); -begin - ActiveControl := EditSearch; - if EditSearch.CanSetFocus() then - EditSearch.SetFocus(); -end; - procedure TSimbaFindInFilesForm.DoSearching; var Total: Integer; diff --git a/Source/ide/simba.form_main.lfm b/Source/ide/simba.form_main.lfm index dcccc191f..f985f0b50 100644 --- a/Source/ide/simba.form_main.lfm +++ b/Source/ide/simba.form_main.lfm @@ -1,7 +1,7 @@ object SimbaMainForm: TSimbaMainForm - Left = 4007 + Left = -1136 Height = 539 - Top = 508 + Top = 461 Width = 1015 Caption = 'Simba' ClientHeight = 539 @@ -438,6 +438,10 @@ object SimbaMainForm: TSimbaMainForm AutoCheck = True Caption = 'Backups' end + object MenuItemFindInFiles: TMenuItem + AutoCheck = True + Caption = 'Find In Files' + end object MenuItem3: TMenuItem Caption = '-' end @@ -2807,11 +2811,11 @@ object SimbaMainForm: TSimbaMainForm object MainMenuSearchSep1: TMenuItem Caption = '-' end - object MenuItemFindInFiles: TMenuItem + object MenuItemSearchFindInFiles: TMenuItem Caption = 'Find in Files ...' ImageIndex = 59 ShortCut = 24646 - OnClick = MenuItemFindInFilesClick + OnClick = MenuItemSearchFindInFilesClick end object MainMenuSearchSep2: TMenuItem Caption = '-' diff --git a/Source/ide/simba.form_main.pas b/Source/ide/simba.form_main.pas index 31f20135d..2d9851c8c 100644 --- a/Source/ide/simba.form_main.pas +++ b/Source/ide/simba.form_main.pas @@ -68,6 +68,7 @@ interface TSimbaMainForm = class(TForm) DockPanel: TAnchorDockPanel; Images: TImageList; + MenuItemFindInFiles: TMenuItem; MenuItemBackup: TMenuItem; MenuItemRunLast: TMenuItem; MenuItemShowCompilerHints: TMenuItem; @@ -77,7 +78,7 @@ TSimbaMainForm = class(TForm) MenuItemFind: TMenuItem; MenuItemFindNext: TMenuItem; MenuItemFindPrev: TMenuItem; - MenuItemFindInFiles: TMenuItem; + MenuItemSearchFindInFiles: TMenuItem; MenuItemReplace: TMenuItem; MenuItemGoto: TMenuItem; MenuItemLowercase: TMenuItem; @@ -188,7 +189,7 @@ TSimbaMainForm = class(TForm) procedure MenuFindClick(Sender: TObject); procedure MenuGotoClick(Sender: TObject); procedure MenuItemDownloadSimbaClick(Sender: TObject); - procedure MenuItemFindInFilesClick(Sender: TObject); + procedure MenuItemSearchFindInFilesClick(Sender: TObject); procedure MenuItemRunLastClick(Sender: TObject); procedure MenuItemSelectLineClick(Sender: TObject); procedure MenuItemSelectWordClick(Sender: TObject); @@ -617,6 +618,7 @@ procedure TSimbaMainForm.Setup; DockMaster.MakeDockable(SimbaDebugImageForm, MenuItemDebugImage); DockMaster.MakeDockable(SimbaColorPickHistoryForm, MenuItemColourHistory); DockMaster.MakeDockable(SimbaBackupsForm, MenuItemBackup); + DockMaster.MakeDockable(SimbaFindInFilesForm, MenuItemFindInFiles); if (SimbaSettings.General.Layout.Value <> '') then begin @@ -809,9 +811,11 @@ procedure TSimbaMainForm.MenuItemDownloadSimbaClick(Sender: TObject); SimbaDownloadSimbaForm.ShowModal(); end; -procedure TSimbaMainForm.MenuItemFindInFilesClick(Sender: TObject); +procedure TSimbaMainForm.MenuItemSearchFindInFilesClick(Sender: TObject); begin - SimbaFindInFilesForm.ShowModal(); + MenuItemFindInFiles.Checked := True; + if Assigned(MenuItemFindInFiles.OnClick) then + MenuItemFindInFiles.OnClick(MenuItemFindInFiles); end; procedure TSimbaMainForm.MenuItemRunLastClick(Sender: TObject);