@@ -87,6 +87,32 @@ procedure TDelphiAIDevIDENTAEditViewNotifier.BeforeSave;
8787
8888end ;
8989
90+ procedure TDelphiAIDevIDENTAEditViewNotifier.ClearLinesNotUsed ;
91+ var
92+ LView: IOTAEditView;
93+ LColCurrent: Integer;
94+ LLineCurrent: Integer;
95+ begin
96+ // //LVars.Release := False;
97+ if LVars.Module = nil then
98+ Exit;
99+
100+ // **
101+ if LVars.Contents.Count <= 1 then
102+ Exit;
103+ // **
104+
105+ LView := TUtilsOTA.GetIOTAEditView(LVars.Module );
106+ LColCurrent := LView.CursorPos.Col;
107+ LLineCurrent := LView.CursorPos.Line;
108+ try
109+ LView.Buffer.EditPosition.Move(LVars.LineIni, 2 );
110+ LView.Buffer.EditPosition.Delete(Pred(LVars.Contents.Count));
111+ finally
112+ LView.Buffer.EditPosition.Move(LLineCurrent, LColCurrent);
113+ end ;
114+ end ;
115+
90116procedure TDelphiAIDevIDENTAEditViewNotifier.BeginPaint (const View : IOTAEditView; var FullRepaint: Boolean);
91117begin
92118 FullRepaint := True;
@@ -125,33 +151,6 @@ procedure TDelphiAIDevIDENTAEditViewNotifier.Modified;
125151
126152end ;
127153
128- procedure TDelphiAIDevIDENTAEditViewNotifier.ClearLinesNotUsed ;
129- var
130- LView: IOTAEditView;
131- LColCurrent: Integer;
132- LLineCurrent: Integer;
133- begin
134- // //LVars.Release := False;
135-
136- if LVars.Module = nil then
137- Exit;
138-
139- // **
140- if LVars.Contents.Count <= 1 then
141- Exit;
142- // **
143-
144- LView := TUtilsOTA.GetIOTAEditView(LVars.Module );
145- LColCurrent := LView.CursorPos.Col;
146- LLineCurrent := LView.CursorPos.Line;
147- try
148- LView.Buffer.EditPosition.Move(LVars.LineIni, 2 );
149- LView.Buffer.EditPosition.Delete(Pred(LVars.Contents.Count));
150- finally
151- LView.Buffer.EditPosition.Move(LLineCurrent, LColCurrent);
152- end ;
153- end ;
154-
155154procedure TDelphiAIDevIDENTAEditViewNotifier.PaintLine (const View : IOTAEditView; LineNumber: Integer;
156155 const LineText: PAnsiChar; const TextWidth: Word; const LineAttributes: TOTAAttributeArray;
157156 const Canvas: TCanvas; const TextRect: TRect; const LineRect: TRect; const CellSize: TSize);
@@ -163,8 +162,8 @@ procedure TDelphiAIDevIDENTAEditViewNotifier.PaintLine(const View: IOTAEditView;
163162
164163 LLineText := string(LineText);
165164
166- if not LLineText.Trim.IsEmpty then
167- Exit;
165+ // AQUI VERIFICA SE A LINHA NAO FOR VAZIA NAO ADICIONA O TEXTO DA SUGESTAO
166+ // if not LLineText.Trim.IsEmpty then Exit;
168167
169168 // if LineNumber <> View.CursorPos.Line then Exit;
170169
@@ -177,7 +176,7 @@ procedure TDelphiAIDevIDENTAEditViewNotifier.PaintLine(const View: IOTAEditView;
177176// end;
178177// end;
179178
180- if (LineNumber >= LVars.LineIni)and (LineNumber < LVars.LineEnd) then
179+ if (LineNumber >= LVars.LineIni) and (LineNumber < LVars.LineEnd) then
181180 begin
182181 Canvas.Brush.Style := bsClear;
183182 Canvas.Font.Color := $777777 ;
0 commit comments