Added paste

This commit is contained in:
Robert Jelic
2025-05-11 03:14:53 +02:00
parent 694bb72f6b
commit 6adfcd41fd
2 changed files with 4 additions and 3 deletions

View File

@@ -236,11 +236,10 @@ function TextBox:mouse_click(button, x, y)
return false
end
--- @shortDescription Handles paste events
--- @protected
function TextBox:paste(text)
if not self.get("editable") or not self.get("focused") then return false end
local lines = self.get("lines")
local cursorX = self.get("cursorX")
local cursorY = self.get("cursorY")
for char in text:gmatch(".") do
if char == "\n" then