浏览代码

Simplify.

Martijn Laan 1 年之前
父节点
当前提交
c47c36bf78
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      Projects/Src/CompForm.pas

+ 1 - 4
Projects/Src/CompForm.pas

@@ -2636,10 +2636,7 @@ begin
     end;
     end;
   end
   end
   else if (Key = VK_LEFT) and not (ssCtrl in Shift) and FOptions.CursorPastEOL then begin
   else if (Key = VK_LEFT) and not (ssCtrl in Shift) and FOptions.CursorPastEOL then begin
-    var CaretPos := FActiveMemo.CaretPosition;
-    var Line := FActiveMemo.GetLineFromPosition(CaretPos);
-    var LinePos := FActiveMemo.GetPositionFromLine(Line);
-    if CaretPos = LinePos then
+    if FActiveMemo.CaretColumn = 0 then
       Key := 0;
       Key := 0;
   end
   end
   else if (Key = VK_RIGHT) and (Shift * [ssShift, ssAlt, ssCtrl] = [ssAlt]) then begin
   else if (Key = VK_RIGHT) and (Shift * [ssShift, ssAlt, ssCtrl] = [ssAlt]) then begin