mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 00:20:08 +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;
|
procedure TSourceEditor.SortSelection;
|
||||||
var
|
var
|
||||||
SortSelectionDialog: TSortSelectionDialog;
|
SortSelectionDialog: TSortSelectionDialog;
|
||||||
|
OldSelText: string;
|
||||||
begin
|
begin
|
||||||
|
OldSelText:=EditorComponent.SelText;
|
||||||
|
if OldSelText='' then exit;
|
||||||
SortSelectionDialog:=TSortSelectionDialog.Create(Application);
|
SortSelectionDialog:=TSortSelectionDialog.Create(Application);
|
||||||
SortSelectionDialog.PreviewSynEdit.Highlighter:=EditorComponent.Highlighter;
|
SortSelectionDialog.PreviewSynEdit.Highlighter:=EditorComponent.Highlighter;
|
||||||
EditorOpts.GetSynEditSelectedColor(SortSelectionDialog.PreviewSynEdit);
|
EditorOpts.GetSynEditSelectedColor(SortSelectionDialog.PreviewSynEdit);
|
||||||
SortSelectionDialog.TheText:=EditorComponent.SelText;
|
SortSelectionDialog.TheText:=OldSelText;
|
||||||
if SortSelectionDialog.ShowModal=mrOk then
|
if SortSelectionDialog.ShowModal=mrOk then
|
||||||
EditorComponent.SelText:=SortSelectionDialog.SortedText;
|
EditorComponent.SelText:=SortSelectionDialog.SortedText;
|
||||||
SortSelectionDialog.Free;
|
SortSelectionDialog.Free;
|
||||||
|
Loading…
Reference in New Issue
Block a user