mirror of
https://github.com/Earu/EasyChat.git
synced 2025-03-04 03:13:20 -05:00
fix: image paste breaking utf characters (#128)
This commit is contained in:
parent
184be4484d
commit
4dd4e13033
@ -2301,7 +2301,7 @@ if CLIENT then
|
||||
|
||||
local caret_pos = self:GetCaretPos()
|
||||
local str = self:GetText()
|
||||
local str_start, str_end = str:sub(1, caret_pos), str:sub(caret_pos + 1)
|
||||
local str_start, str_end = utf8.sub(str, 1, caret_pos), utf8.sub(str, caret_pos + 1)
|
||||
self:SetText(("%s%s%s"):format(str_start, UPLOADING_TEXT, str_end))
|
||||
uploading = true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user