ident completion: added stored default ident and fixed empty sort selection

git-svn-id: trunk@3037 -
This commit is contained in:
mattias 2002-08-18 08:57:13 +00:00
parent 375ff99b65
commit 26ae315596

View File

@ -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;