Skip to content

Commit

Permalink
accomodate utf8 partials
Browse files Browse the repository at this point in the history
  • Loading branch information
figuerom16 committed Jan 16, 2024
1 parent c4b5f61 commit 3a2ccec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion term.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func (t *Terminal) guessCellSize() fyne.Size {
func (t *Terminal) run() {
bufLen := 4096
buf := make([]byte, bufLen)
var leftOver []byte
leftOver := make([]byte, bufLen+3) // +3 for utf8 partials
for {
num, err := t.out.Read(buf)
if err != nil {
Expand Down

0 comments on commit 3a2ccec

Please sign in to comment.