From 681f349fc4331cff618cc6855d2db59d5312b906 Mon Sep 17 00:00:00 2001 From: eeeXun Date: Sat, 22 Oct 2022 01:45:21 +0800 Subject: [PATCH] fix swap text error --- ui.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui.go b/ui.go index 6d2bfcd..ecee221 100644 --- a/ui.go +++ b/ui.go @@ -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) }