summaryrefslogtreecommitdiff
path: root/src/gui/fpg_memo.pas
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/fpg_memo.pas')
-rw-r--r--src/gui/fpg_memo.pas11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/fpg_memo.pas b/src/gui/fpg_memo.pas
index 374c8d47..672e7126 100644
--- a/src/gui/fpg_memo.pas
+++ b/src/gui/fpg_memo.pas
@@ -308,12 +308,12 @@ var
begin
VHeight := Height - 4;
HWidth := Width - 4;
-
+
if FVScrollBar.Visible then
Dec(HWidth, FVScrollBar.Width);
if FHScrollBar.Visible then
Dec(VHeight, FHScrollBar.Height);
-
+
FHScrollBar.Top := Height -FHScrollBar.Height - 2;
FHScrollBar.Left := 2;
FHScrollBar.Width := HWidth;
@@ -1048,7 +1048,7 @@ begin
if not Focused then
fpgCaret.UnSetCaret(Canvas);
-
+
// The little square in the bottom right corner
if FHScrollBar.Visible and FVScrollBar.Visible then
begin
@@ -1348,7 +1348,7 @@ begin
RePaint
else
inherited;
-
+
if hasChanged then
if Assigned(FOnChange) then
FOnChange(self);
@@ -1675,7 +1675,8 @@ end;
procedure TfpgMemo.EndUpdate;
begin
- Dec(FUpdateCount);
+ if FUpdateCount > 0 then
+ Dec(FUpdateCount);
if FUpdateCount <= 0 then
begin
Invalidate;