v/GTT
1
0
mirror of https://github.com/eeeXun/GTT.git synced 2025-05-18 08:40:35 -07:00

fix swap text error

This commit is contained in:
eeeXun 2022-10-22 01:45:21 +08:00
parent 64d479a6cd
commit 681f349fc4

2
ui.go
View File

@ -125,7 +125,7 @@ func TranslatePageHandler(event *tcell.EventKey) *tcell.EventKey {
updateTitle()
src_text := src_box.GetText()
dst_text := dst_box.GetText(false)
src_box.SetText(dst_text, true)
src_box.SetText(dst_text[:len(dst_text)-1], true)
dst_box.SetText(src_text)
}