@@ -97,17 +97,22 @@ procedure TDelphiAIDevIDENTAEditViewNotifier.EditorIdle(const View: IOTAEditView
97
97
LRow: Integer;
98
98
LColumn: Integer;
99
99
begin
100
+ if LVars.LineIni <= 0 then
101
+ Exit;
102
+
100
103
TUtilsOTA.GetCursorPosition(LRow, LColumn);
101
104
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;
110
114
end ;
115
+ end ;
111
116
end ;
112
117
113
118
procedure TDelphiAIDevIDENTAEditViewNotifier.EndPaint (const View : IOTAEditView);
@@ -126,16 +131,11 @@ procedure TDelphiAIDevIDENTAEditViewNotifier.ClearLinesNotUsed;
126
131
LColCurrent: Integer;
127
132
LLineCurrent: Integer;
128
133
begin
129
- LVars.Release := False;
134
+ // // LVars.Release := False;
130
135
131
136
if LVars.Module = nil then
132
137
Exit;
133
138
134
- TUtils.AddLog(sLineBreak + LVars.Module .FileName + sLineBreak + TUtilsOTA.GetCurrentModule.FileName);
135
-
136
- // if LVars.Module.FileName <> TUtilsOTA.GetCurrentModule.FileName then
137
- // Exit;
138
-
139
139
LView := TUtilsOTA.GetIOTAEditView(LVars.Module );
140
140
LColCurrent := LView.CursorPos.Col;
141
141
LLineCurrent := LView.CursorPos.Line;
@@ -161,36 +161,16 @@ procedure TDelphiAIDevIDENTAEditViewNotifier.PaintLine(const View: IOTAEditView;
161
161
if not LLineText.Trim.IsEmpty then
162
162
Exit;
163
163
164
-
165
164
// if LineNumber <> View.CursorPos.Line then Exit;
166
165
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;
194
174
195
175
if (LineNumber >= LVars.LineIni)and (LineNumber < LVars.LineEnd) then
196
176
begin
0 commit comments