From 031fa42f312062ba44aae82eae2cf815cb7b2ffc Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Tue, 25 Aug 2015 17:57:50 +0200 Subject: [PATCH] fix, ditto were not always well removed from ddoc --- src/ce_dcd.pas | 10 +++++----- src/ce_synmemo.pas | 7 ------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/ce_dcd.pas b/src/ce_dcd.pas index 6211307e..e4581664 100644 --- a/src/ce_dcd.pas +++ b/src/ce_dcd.pas @@ -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); diff --git a/src/ce_synmemo.pas b/src/ce_synmemo.pas index dbcaa731..9238f953 100644 --- a/src/ce_synmemo.pas +++ b/src/ce_synmemo.pas @@ -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;