浏览代码

FIX #937: CommandLine text is incorrectly all selected on MacOS (#942)

rich2014 2 年之前
父节点
当前提交
c0e361b6f4
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      src/fmain.pas

+ 8 - 0
src/fmain.pas

@@ -1208,6 +1208,14 @@ begin
   // 5. the issue can be effectively avoided by setting a larger width.
   nbLeft.Width:= 2048;
   nbRight.Width:= 2048;
+
+  // in LCLCOCOA, there is an issue about the order of CM_ENTER messages in edtCommand
+  // since CM_ENTER is sent delayed, when we press a Key in the main form,
+  // edtCommand.SelStart set in TypeInCommandLine() is overwritten when CM_ENTER is processed.
+  // if edtCommand.AutoSelect=True, it will cause all selected.
+  // there is the MR in LCL, but it has not been merged yet.
+  // see also: https://gitlab.com/freepascal.org/lazarus/lazarus/-/merge_requests/116
+  edtCommand.AutoSelect:= false;
   {$ENDIF}
 
   LoadTabs;