diff --git a/Libraries/GUI.lua b/Libraries/GUI.lua index 42fae9f4..753a655b 100755 --- a/Libraries/GUI.lua +++ b/Libraries/GUI.lua @@ -3064,9 +3064,11 @@ local function inputEventHandler(workspace, input, e1, e2, e3, e4, e5, e6, ...) input:setCursorPosition(unicode.len(input.text) + 1) -- V - elseif e4 == 47 and type(clipboard.paste()) ~= "table" and clipboard.paste() ~= nil then - input.text = input.text .. tostring(clipboard.paste()) - input:setCursorPosition(unicode.len(input.text)+1) + elseif e4 == 47 and type(clipboard.paste()) ~= "table" and clipboard.paste() ~= nil then + local startPos = input.cursorPosition + local toPaste = tostring(clipboard.paste()) + input.text = unicode.sub(input.text, 1,startPos) .. toPaste .. unicode.sub(input.text, startPos, unicode.len(input.text)) + input:setCursorPosition(startPos + unicode.len(toPaste)+1) else local char = unicode.char(e3)