1
0
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:
Aoki 2024-09-23 23:12:25 +03:00 committed by GitHub
parent 184be4484d
commit 4dd4e13033
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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