summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2009-08-02 17:04:25 +0200
committerGraeme Geldenhuys <graemeg@gmail.com>2009-08-02 17:04:25 +0200
commit5270e94548b95aab52f6d4d7466f83760706afb8 (patch)
tree7a831745c196217bad5dd4a19c8bb2b1b4ad27c9
parent6eb02628545797e6249038b895f55fe4322bddda (diff)
downloadfpGUI-5270e94548b95aab52f6d4d7466f83760706afb8.tar.xz
Code cleanup in KeyboardCaretNav method.
Removed all unused code from method. Signed-off-by: Graeme Geldenhuys <graemeg@gmail.com>
-rw-r--r--prototypes/textedit/fpg_textedit.pas37
1 files changed, 0 insertions, 37 deletions
diff --git a/prototypes/textedit/fpg_textedit.pas b/prototypes/textedit/fpg_textedit.pas
index 5c51d630..9fe33bcb 100644
--- a/prototypes/textedit/fpg_textedit.pas
+++ b/prototypes/textedit/fpg_textedit.pas
@@ -661,10 +661,6 @@ begin
begin
if CaretPos.Y <= pred(FLines.Count) then
begin
- writeln('********');
- //GliphY := (CaretPos.Y - FTopLine) * FChrH;
- //DrawLine(Canvas, CaretPos.Y, GliphY);
- //DrawCaret(CaretPos.X, CaretPos.Y + 1, False);
if (ssCtrl in ShiftState) and (CaretPos.Y > 0) then
begin
CaretPos.Y := CaretPos.Y - 1;
@@ -673,36 +669,18 @@ begin
begin
FSelEndNo := CaretPos.Y;
FSelEndOffs := CaretPos.X;
-// DrawVisible;
end;
Exit;
end;
end;
CaretPos.Y := CaretPos.Y - 1;
CaretPos.X := Length(FLines[CaretPos.Y]);
- //if not FSelected then
- //begin
- //GliphY := (CaretPos.Y - FTopLine) * FChrH;
- //DrawLine(Canvas, CaretPos.X, GliphY);
- //end else
- //DrawVisible;
end
else
begin
CaretPos.X := 0;
- //GliphY := (CaretPos.Y - FTopLine) * FChrH;
- //if not FSelected then
- //DrawLine(Canvas, CaretPos.Y, GliphY)
- //else
- //DrawVisible;
end;
end;
- //else
- //begin
- //GliphY := (CaretPos.Y - FTopLine) * FChrH;
- //DrawLine(Canvas, CaretPos.Y, GliphY);
- //DrawCaret(CaretPos.X, CaretPos.Y, True);
- //end;
if ssShift in ShiftState then
begin
if not FSelected then
@@ -741,20 +719,15 @@ begin
end;
end;
FSelected := (FSelStartNo <> FSelEndNo) or (FSelStartOffs <> FSelEndOffs);
- //DrawVisible;
Exit;
end;
if FSelected then
begin
FSelected := False;
- //DrawVisible;
- //DrawCaret(CaretPos.X, CaretPos.Y, True);
end;
if ssCtrl in ShiftState then
begin
CtrlKeyLeftKey;
- //DrawVisible;
- //DrawCaret(CaretPos.X, CaretPos.Y, True);
end;
FSelStartNo := CaretPos.Y;
FSelStartOffs := CaretPos.X;
@@ -769,11 +742,6 @@ begin
FMaxScrollH := FMaxScrollH + 2;
UpdateScrollBars;
end;
-// if CaretPos.x <= pred(FLines.Count) then
-// begin
-// GliphY := (CaretPos.x - FTopLine) * FChrH;
-// DrawLine(Canvas, CaretPos.x, GliphY);
-// end;
if ssShift in ShiftState then
begin
if not FSelected then
@@ -794,21 +762,16 @@ begin
FSelEndOffs := CaretPos.X;
end;
FSelected := (FSelStartNo <> FSelEndNo) or (FSelStartOffs <> FSelEndOffs);
-// DrawVisible;
Exit;
end;
if FSelected then
begin
FSelected := False;
-// DrawVisible;
-// DrawCaret(CaretPos.Y, CaretPos.X, True);
end;
if ssCtrl in ShiftState then
begin
CtrlKeyRightKey;
-// DrawVisible;
end;
-// DrawCaret(CaretPos.Y, CaretPos.X, True);
FSelStartNo := CaretPos.Y;
FSelStartOffs := CaretPos.X;
end;