From 17a49c92a99787115e75e026f21b8ad17a29842d Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Sat, 18 Jun 2016 09:06:48 +0200 Subject: [PATCH] prevent dup in imports list --- src/ce_dlang.pas | 2 +- src/ce_editor.lfm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ce_dlang.pas b/src/ce_dlang.pas index d0c8ea7e..69f87fd8 100644 --- a/src/ce_dlang.pas +++ b/src/ce_dlang.pas @@ -1039,7 +1039,7 @@ begin itm := '' else if (tok^.Data = ';') or (tok^.Data = ':') or (tok^.Data = ',') then begin - if length(itm) <> 0 then + if (length(itm) <> 0) and (imports.IndexOf(itm) = -1) then imports.Add(itm); itm := ''; if (tok^.Data = ';') or (tok^.Data = ':') then diff --git a/src/ce_editor.lfm b/src/ce_editor.lfm index aaf24a62..c92e7841 100644 --- a/src/ce_editor.lfm +++ b/src/ce_editor.lfm @@ -136,7 +136,7 @@ inherited CEEditorWidget: TCEEditorWidget OnClick = MenuItem5Click end object MenuItem8: TMenuItem - Caption = 'Save import to file...' + Caption = 'Save imports to file...' OnClick = MenuItem8Click end end