From 26ae315596dcdf59e28ea03bb12ff51147fde5f4 Mon Sep 17 00:00:00 2001 From: mattias Date: Sun, 18 Aug 2002 08:57:13 +0000 Subject: [PATCH] ident completion: added stored default ident and fixed empty sort selection git-svn-id: trunk@3037 - --- ide/uniteditor.pp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ide/uniteditor.pp b/ide/uniteditor.pp index 418ace175a..0ebef9459e 100644 --- a/ide/uniteditor.pp +++ b/ide/uniteditor.pp @@ -1254,11 +1254,14 @@ end; procedure TSourceEditor.SortSelection; var SortSelectionDialog: TSortSelectionDialog; + OldSelText: string; begin + OldSelText:=EditorComponent.SelText; + if OldSelText='' then exit; SortSelectionDialog:=TSortSelectionDialog.Create(Application); SortSelectionDialog.PreviewSynEdit.Highlighter:=EditorComponent.Highlighter; EditorOpts.GetSynEditSelectedColor(SortSelectionDialog.PreviewSynEdit); - SortSelectionDialog.TheText:=EditorComponent.SelText; + SortSelectionDialog.TheText:=OldSelText; if SortSelectionDialog.ShowModal=mrOk then EditorComponent.SelText:=SortSelectionDialog.SortedText; SortSelectionDialog.Free;