From 6831d5fa1ad6f38fa61b7a995b0dc0b6a992627c Mon Sep 17 00:00:00 2001 From: Nathan Rijksen Date: Fri, 8 Sep 2023 15:48:24 -0700 Subject: [PATCH] Fix compilation on mac/linux --- helpers_unix.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/helpers_unix.go b/helpers_unix.go index 42db1bb..5034992 100644 --- a/helpers_unix.go +++ b/helpers_unix.go @@ -4,12 +4,11 @@ package termtest import ( - "bytes" "errors" ) var ERR_ACCESS_DENIED = errors.New("only used on windows, this should never match") -func cleanPtySnapshot(b []byte, _ bool) []byte { - return bytes.TrimRight(b, "\x00") +func cleanPtySnapshot(b []byte, cursorPos int, _ bool) ([]byte, int) { + return b, cursorPos }