mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 03:48:08 +02:00
IDE: Optimize "UpdateEditorCommands" - do not join all text lines (TStrings.Text) of the editor, just to check if the editor is empty.
This commit is contained in:
parent
9f3623bb45
commit
f390d81d79
@ -3957,7 +3957,9 @@ begin
|
||||
IDECommandList.FindIDECommand(ecCut).Enabled := SelEditable;
|
||||
IDECommandList.FindIDECommand(ecCopy).Enabled := SelAvail;
|
||||
IDECommandList.FindIDECommand(ecPaste).Enabled := Editable;
|
||||
IDECommandList.FindIDECommand(ecSelectAll).Enabled := Assigned(ASrcEdit) and (ASrcEdit.SourceText<>'');
|
||||
IDECommandList.FindIDECommand(ecSelectAll).Enabled := Assigned(ASrcEdit) and
|
||||
((ASrcEdit.LineCount>1) or ((ASrcEdit.LineCount=1) and (ASrcEdit.Lines[0] <> '')));
|
||||
|
||||
end;
|
||||
|
||||
IDECommandList.FindIDECommand(ecMultiPaste).Enabled := Editable;
|
||||
|
Loading…
Reference in New Issue
Block a user