mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-05 05:01:06 +02:00
ident completion: added stored default ident and fixed empty sort selection
git-svn-id: trunk@3037 -
This commit is contained in:
parent
375ff99b65
commit
26ae315596
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user