Skip to content

Commit 10c2e87

Browse files
committed
editor: hold middle mouse button while selecting for multi caret (in column mode)
1 parent 91600df commit 10c2e87

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.github/workflows/archive.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ jobs:
6363
echo "https://github.com/Villavu/Simba-Build-Archive/blob/main/$date_year/$date_month_day%20$branch%20$commit/Win32.zip?raw=true" > latest.win32
6464
echo "https://github.com/Villavu/Simba-Build-Archive/blob/main/$date_year/$date_month_day%20$branch%20$commit/Win64.zip?raw=true" > latest.win64
6565
echo "https://github.com/Villavu/Simba-Build-Archive/blob/main/$date_year/$date_month_day%20$branch%20$commit/Win64%20DebugInfo.zip?raw=true" > latest.win64debuginfo
66+
echo "https://github.com/Villavu/Simba-Build-Archive/blob/main/$date_year/$date_month_day%20$branch%20$commit/Linux64.zip?raw=true" > latest.linux64
6667
echo "https://github.com/Villavu/Simba-Build-Archive/blob/main/$date_year/$date_month_day%20$branch%20$commit/Mac.zip?raw=true" > latest.mac
6768
echo "https://github.com/Villavu/Simba-Build-Archive/blob/main/$date_year/$date_month_day%20$branch%20$commit/Mac%20Arm.zip?raw=true" > latest.macarm
6869

Source/ide/simba.ide_editor_multicaret.pas

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,32 @@ implementation
3030

3131
function TSimbaEditorPlugin_MultiCaret.DoSimbaHandleMouseAction(AnAction: TSynEditMouseAction; var AnInfo: TSynEditMouseActionInfo): Boolean;
3232
begin
33+
// default to adding in selection if available
3334
if (AnAction.Command = emcPluginMultiCaretToggleCaret) and Editor.SelAvail then
3435
AnAction.Command := emcPluginMultiCaretSelectionToCarets;
3536

3637
Result := DoHandleMouseAction(AnAction, AnInfo);
3738
end;
3839

3940
procedure TSimbaEditorPlugin_MultiCaret.DoEditorAdded(AValue: TCustomSynEdit);
41+
var
42+
I: Integer;
4043
begin
4144
inherited DoEditorAdded(AValue);
4245

4346
if (AValue <> nil) then
4447
begin
4548
AValue.UnRegisterMouseActionExecHandler(@DoHandleMouseAction);
4649
AValue.RegisterMouseActionExecHandler(@DoSimbaHandleMouseAction);
50+
51+
// middle mouse click and selection does multi caret in column mode
52+
for I := 0 to AValue.MouseTextActions.Count - 1 do
53+
if (AValue.MouseTextActions[I].Command = emcPasteSelection) then
54+
begin
55+
AValue.MouseTextActions.Delete(I);
56+
Break;
57+
end;
58+
AValue.MouseTextActions.AddCommand(emcStartColumnSelections, True, mbXMiddle, ccSingle, cdDown, [], []);
4759
end;
4860
end;
4961

0 commit comments

Comments
 (0)