fix, ditto were not always well removed from ddoc

This commit is contained in:
Basile Burg 2015-08-25 17:57:50 +02:00
parent 6b11532e19
commit 031fa42f31
2 changed files with 5 additions and 12 deletions

View File

@ -363,12 +363,12 @@ begin
if fTempLines.Count = 0 then
updateServerlistening;
for str in fTempLines do
begin
i := length(str);
if (i > 4) and (i < 9) and AnsiSameText(str[1..5], 'DITTO') then
continue;
aComment += ReplaceStr(str, '\n', LineEnding);
end;
//
aComment := ReplaceText(aComment, 'ditto' + LineEnding + LineEnding, '');
aComment := ReplaceText(aComment, 'ditto', '');
aComment := TrimLeft(aComment);
aComment := TrimRight(aComment);
end;
procedure TCEDcdWrapper.getDeclFromCursor(out aFilename: string; out aPosition: Integer);

View File

@ -637,13 +637,6 @@ begin
fCanShowHint := false;
DcdWrapper.getDdocFromCursor(str);
//
if (length(str) > 0) then
if str[1] = #13 then
str := str[2..length(str)];
if (length(str) > 0) then
if str[1] = #10 then
str := str[2..length(str)];
//
if str <> '' then
begin
fDDocWin.FontSize := Font.Size;