From edcf10f5c25cd42b08057cd035b3b67e26f25e80 Mon Sep 17 00:00:00 2001 From: pierre Date: Thu, 23 Mar 2000 21:36:19 +0000 Subject: [PATCH] * get correct position in indicator again --- ide/text/wcedit.pas | 8 +++++++- ide/text/weditor.pas | 15 ++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ide/text/wcedit.pas b/ide/text/wcedit.pas index 3c629c0b51..925f1d0181 100644 --- a/ide/text/wcedit.pas +++ b/ide/text/wcedit.pas @@ -150,6 +150,7 @@ type public procedure UpdateIndicator; virtual; procedure ModifiedChanged; virtual; + procedure PositionChanged; virtual; procedure LimitsChanged; virtual; function IsClipboard: Boolean; virtual; function LoadFromStream(Stream: PStream): boolean; virtual; @@ -1099,6 +1100,11 @@ begin UpdateIndicator; end; +procedure TCodeEditor.PositionChanged; +begin + UpdateIndicator; +end; + procedure TCodeEditor.JumpToLastCursorPos; {$ifdef Undo} var @@ -1177,7 +1183,7 @@ begin eaDeleteLine : begin SetCurPtr(EndPos.X,EndPos.Y); - DelEnd; + {DelEnd;wrong for eaCut at least } InsertNewLine; SetCurPtr(StartPos.X,StartPos.Y); SetLineText(StartPos.Y,GetStr(Text)); diff --git a/ide/text/weditor.pas b/ide/text/weditor.pas index 8a05cc7abe..57328214be 100644 --- a/ide/text/weditor.pas +++ b/ide/text/weditor.pas @@ -463,6 +463,7 @@ type procedure ContentsChanged; virtual; procedure LimitsChanged; virtual; procedure ModifiedChanged; virtual; + procedure PositionChanged; virtual; procedure TabSizeChanged; virtual; procedure SyntaxStateChanged; virtual; procedure StoreUndoChanged; virtual; @@ -2610,6 +2611,11 @@ begin { Abstract } end; +procedure TCustomCodeEditor.PositionChanged; +begin + { Abstract } +end; + procedure TCustomCodeEditor.TabSizeChanged; begin { Abstract } @@ -4934,8 +4940,8 @@ begin SetHighlightRow(-1);} if ((CurPos.X<>OldPos.X) or (CurPos.Y<>OldPos.Y)) then AddAction(eaMoveCursor,OldPos,CurPos,''); -{ if ((CurPos.X<>OldPos.X) or (CurPos.Y<>OldPos.Y)) then - UpdateIndicator;} + if ((CurPos.X<>OldPos.X) or (CurPos.Y<>OldPos.Y)) then + PositionChanged;{UpdateIndicator;} UnLock; end; @@ -5581,7 +5587,10 @@ end; END. { $Log$ - Revision 1.85 2000-03-21 23:17:47 pierre + Revision 1.86 2000-03-23 21:36:19 pierre + * get correct position in indicator again + + Revision 1.85 2000/03/21 23:17:47 pierre + Gabor patch to add support for multiple windows of same file weditor has been splitted into weditor and wcedit units