From e067acf788cf1011ed6c5afca62d65f86f1473fb Mon Sep 17 00:00:00 2001 From: and3md Date: Thu, 21 Sep 2017 18:41:26 +0200 Subject: [PATCH] Speed up Paste action state check when a lot of text in clipboard (no string conversion) --- src/dlangui/widgets/editors.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dlangui/widgets/editors.d b/src/dlangui/widgets/editors.d index 62fabe25..2941113c 100644 --- a/src/dlangui/widgets/editors.d +++ b/src/dlangui/widgets/editors.d @@ -642,7 +642,7 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction case Cut: return enabled && (_copyCurrentLineWhenNoSelection || !_selectionRange.empty); case Paste: - return enabled && Platform.instance.getClipboardText().length > 0; + return enabled && Platform.instance.hasClipboardText(); case Undo: return enabled && _content.hasUndo; case Redo: