From c8729aebb806ea3ebf5f1218a27473bfb508da5e Mon Sep 17 00:00:00 2001 From: "Luke I. Wilson" Date: Thu, 18 Mar 2021 19:46:36 -0500 Subject: [PATCH] Fix bug in GetSelectedString in TextEdit --- ui/textedit.go | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/textedit.go b/ui/textedit.go index 2968076..812a48b 100644 --- a/ui/textedit.go +++ b/ui/textedit.go @@ -391,6 +391,7 @@ func (t *TextEdit) GetSelectedString() string { } else { // Normal access lastLine = string([]rune(lastLine)[:t.selection.EndCol+1]) } + lines[len(lines)-1] = lastLine lines[0] = string([]rune(lines[0])[t.selection.StartCol:]) // Start first line at start col