summaryrefslogtreecommitdiff
path: root/xmake/core/ui/textedit.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-11-26 22:45:43 +0800
committerruki <[email protected]>2020-11-26 22:45:43 +0800
commitd1f2ddce09ce709b1fd07e9ba25449f095325652 (patch)
treee31005972cba778ef5a7e5b28abcd6ecff183842 /xmake/core/ui/textedit.lua
parent6426a1e2f0dea74ee3d82abe9f8b7aa46ed9ef9f (diff)
improve textedit/mouse
Diffstat (limited to 'xmake/core/ui/textedit.lua')
-rw-r--r--xmake/core/ui/textedit.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/core/ui/textedit.lua b/xmake/core/ui/textedit.lua
index 4c06ed564..98219637b 100644
--- a/xmake/core/ui/textedit.lua
+++ b/xmake/core/ui/textedit.lua
@@ -26,6 +26,7 @@ local event = require("ui/event")
local border = require("ui/border")
local curses = require("ui/curses")
local textarea = require("ui/textarea")
+local action = require("ltui/action")
-- define module
local textedit = textedit or textarea()
@@ -42,6 +43,10 @@ function textedit:init(name, bounds, text)
-- mark as selectable
self:option_set("selectable", true)
+ -- mark as mouseable
+ self:option_set("mouseable", true)
+ self:action_set(action.ac_on_clicked, function () return true end)
+
-- disable progress
self:option_set("progress", false)