From f7c0c7b89a45bf02a3ca3ffee8251d7a09654e41 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 23 Jan 2018 22:30:30 +0800 Subject: modify action args --- xmake/core/ui/inputdialog.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xmake/core/ui/inputdialog.lua') diff --git a/xmake/core/ui/inputdialog.lua b/xmake/core/ui/inputdialog.lua index 5a2a271ff..511a9c810 100644 --- a/xmake/core/ui/inputdialog.lua +++ b/xmake/core/ui/inputdialog.lua @@ -52,9 +52,9 @@ function inputdialog:init(name, bounds, title) self:text():option_set("progress", false) -- text changed - self:text():action_set(action.ac_on_text_changed, function (v, e) - if e.text then - local lines = #self:text():splitext(e.text) + self:text():action_set(action.ac_on_text_changed, function (v) + if v:text() then + local lines = #self:text():splitext(v:text()) if lines > 0 and lines < self:height() then self:text():bounds().ey = lines self:textedit():bounds().sy = lines -- cgit v1.3.1