@@ -97,17 +97,22 @@ procedure TDelphiAIDevIDENTAEditViewNotifier.EditorIdle(const View: IOTAEditView
9797 LRow: Integer;
9898 LColumn: Integer;
9999begin
100+ if LVars.LineIni <= 0 then
101+ Exit;
102+
100103 TUtilsOTA.GetCursorPosition(LRow, LColumn);
101104
102- if LVars.LineIni > 0 then
103- // if LVars.Release then
104- if (LRow <> LVars.Row) or (LColumn <> LVars.Column) then
105- begin
106- // LVars.LineIni := 0;
107- // LVars.Clear;
108- LVars.Release := True;
109- TUtils.AddLog(' EditorIdle' );
105+ if (LRow <> LVars.Row) or (LColumn <> LVars.Column) then
106+ begin
107+ TUtils.AddLog(' EditorIdle' );
108+
109+ // //LVars.Release := True;
110+ try
111+ Self.ClearLinesNotUsed;
112+ finally
113+ LVars.Clear;
110114 end ;
115+ end ;
111116end ;
112117
113118procedure TDelphiAIDevIDENTAEditViewNotifier.EndPaint (const View : IOTAEditView);
@@ -126,16 +131,11 @@ procedure TDelphiAIDevIDENTAEditViewNotifier.ClearLinesNotUsed;
126131 LColCurrent: Integer;
127132 LLineCurrent: Integer;
128133begin
129- LVars.Release := False;
134+ // // LVars.Release := False;
130135
131136 if LVars.Module = nil then
132137 Exit;
133138
134- TUtils.AddLog(sLineBreak + LVars.Module .FileName + sLineBreak + TUtilsOTA.GetCurrentModule.FileName);
135-
136- // if LVars.Module.FileName <> TUtilsOTA.GetCurrentModule.FileName then
137- // Exit;
138-
139139 LView := TUtilsOTA.GetIOTAEditView(LVars.Module );
140140 LColCurrent := LView.CursorPos.Col;
141141 LLineCurrent := LView.CursorPos.Line;
@@ -161,36 +161,16 @@ procedure TDelphiAIDevIDENTAEditViewNotifier.PaintLine(const View: IOTAEditView;
161161 if not LLineText.Trim.IsEmpty then
162162 Exit;
163163
164-
165164 // if LineNumber <> View.CursorPos.Line then Exit;
166165
167- if LVars.Release then
168- begin
169- try
170- Self.ClearLinesNotUsed;
171- finally
172- LVars.Clear;
173- end ;
174-
175- { TUtils.AddLog(sLineBreak + LVars.Module.FileName + sLineBreak + TUtilsOTA.GetCurrentModule.FileName);
176- LVars.Release := False;
177-
178- try
179- if LVars.Module.FileName = TUtilsOTA.GetCurrentModule.FileName then
180- begin
181- LColCurrent := View.CursorPos.Col;
182- LLineCurrent := View.CursorPos.Line;
183- try
184- View.Buffer.EditPosition.Move(LVars.LineIni, 2);
185- View.Buffer.EditPosition.Delete(Pred(LVars.Contents.Count));
186- finally
187- View.Buffer.EditPosition.Move(LLineCurrent, LColCurrent);
188- end;
189- end
190- finally
191- LVars.Clear;
192- end;}
193- end ;
166+ // if LVars.Release then
167+ // begin
168+ // try
169+ // Self.ClearLinesNotUsed;
170+ // finally
171+ // LVars.Clear;
172+ // end;
173+ // end;
194174
195175 if (LineNumber >= LVars.LineIni)and (LineNumber < LVars.LineEnd) then
196176 begin
0 commit comments