Skip to content

Commit 6adfcd4

Browse files
committed
Added paste
1 parent 694bb72 commit 6adfcd4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/elements/Input.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ function Input:blur()
193193
self:updateRender()
194194
end
195195

196+
--- @shortDescription Handles paste events
197+
--- @protected
196198
function Input:paste(content)
197199
if not self.get("focused") then return false end
198200
local text = self.get("text")

src/elements/TextBox.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,10 @@ function TextBox:mouse_click(button, x, y)
236236
return false
237237
end
238238

239+
--- @shortDescription Handles paste events
240+
--- @protected
239241
function TextBox:paste(text)
240242
if not self.get("editable") or not self.get("focused") then return false end
241-
local lines = self.get("lines")
242-
local cursorX = self.get("cursorX")
243-
local cursorY = self.get("cursorY")
244243

245244
for char in text:gmatch(".") do
246245
if char == "\n" then

0 commit comments

Comments
 (0)