@@ -87,6 +87,32 @@ procedure TDelphiAIDevIDENTAEditViewNotifier.BeforeSave;
87
87
88
88
end ;
89
89
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
+
90
116
procedure TDelphiAIDevIDENTAEditViewNotifier.BeginPaint (const View : IOTAEditView; var FullRepaint: Boolean);
91
117
begin
92
118
FullRepaint := True;
@@ -125,33 +151,6 @@ procedure TDelphiAIDevIDENTAEditViewNotifier.Modified;
125
151
126
152
end ;
127
153
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
-
155
154
procedure TDelphiAIDevIDENTAEditViewNotifier.PaintLine (const View : IOTAEditView; LineNumber: Integer;
156
155
const LineText: PAnsiChar; const TextWidth: Word; const LineAttributes: TOTAAttributeArray;
157
156
const Canvas: TCanvas; const TextRect: TRect; const LineRect: TRect; const CellSize: TSize);
@@ -163,8 +162,8 @@ procedure TDelphiAIDevIDENTAEditViewNotifier.PaintLine(const View: IOTAEditView;
163
162
164
163
LLineText := string(LineText);
165
164
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;
168
167
169
168
// if LineNumber <> View.CursorPos.Line then Exit;
170
169
@@ -177,7 +176,7 @@ procedure TDelphiAIDevIDENTAEditViewNotifier.PaintLine(const View: IOTAEditView;
177
176
// end;
178
177
// end;
179
178
180
- if (LineNumber >= LVars.LineIni)and (LineNumber < LVars.LineEnd) then
179
+ if (LineNumber >= LVars.LineIni) and (LineNumber < LVars.LineEnd) then
181
180
begin
182
181
Canvas.Brush.Style := bsClear;
183
182
Canvas.Font.Color := $777777 ;
0 commit comments