Browse Source

Mouse double click select word, triple click select line

Margers 7 months ago
parent
commit
12bc05d2b4
1 changed files with 12 additions and 1 deletions
  1. 12 1
      packages/ide/weditor.pas

+ 12 - 1
packages/ide/weditor.pas

@@ -3748,7 +3748,7 @@ begin
            LocalMenu(P);
            ClearEvent(Event);
          end else
-       if Event.Buttons=mbLeftButton then
+       if (Event.Buttons=mbLeftButton) and not(Event.Double or Event.Triple) then
         begin
           GetMousePos(P);
           StartP:=P;
@@ -3762,6 +3762,17 @@ begin
             DrawView;
           until not MouseEvent(Event, evMouseMove+evMouseAuto);
           DrawView;
+          ClearEvent(Event);
+        end else
+      if (Event.Buttons=mbLeftButton) and (Event.Double) then
+        begin
+          SelectWord;
+          ClearEvent(Event);
+        end else
+      if (Event.Buttons=mbLeftButton) and (Event.Triple) then
+        begin
+          SelectLine;
+          ClearEvent(Event);
         end;
     evKeyDown :
       begin