Browse Source

select to beginning of the file (ctrl+shift+home)

Margers 11 months ago
parent
commit
975ee9d9f0
1 changed files with 12 additions and 6 deletions
  1. 12 6
      packages/ide/weditor.pas

+ 12 - 6
packages/ide/weditor.pas

@@ -4363,12 +4363,18 @@ end;
 
 procedure TCustomCodeEditor.WindowStart;
 begin
-  SetCurPtr(CurPos.X,Delta.Y);
-end;
-
-procedure TCustomCodeEditor.WindowEnd;
-begin
-  SetCurPtr(CurPos.X,Delta.Y+Size.Y-1);
+  if not NoSelect and ShouldExtend then
+    TextStart    {select to start}
+  else
+    SetCurPtr(CurPos.X,Delta.Y);
+ end;
+ 
+ procedure TCustomCodeEditor.WindowEnd;
+ begin
+  if not NoSelect and ShouldExtend then
+    TextEnd      {select to end}
+  else
+    SetCurPtr(CurPos.X,Delta.Y+Size.Y-1);
 end;
 
 procedure TCustomCodeEditor.JumpSelStart;