summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNemesis <jerome.desroziers.54@gmail.com>2024-07-28 12:57:48 +0200
committerNemesis <jerome.desroziers.54@gmail.com>2024-07-28 12:57:48 +0200
commite64e9d6422e0404c15a1544676c38ddb08e7a7ed (patch)
treed8cfe17d0259ae5452bb3562b1ec0faace85ea75
parent3a803e94cfa813861d4f8ca2257d934892045614 (diff)
fixed hangout when pasting empty string with kitty
-rw-r--r--main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.go b/main.go
index c698a8d..d25666e 100644
--- a/main.go
+++ b/main.go
@@ -199,7 +199,7 @@ func paste() error {
}
buf = append(buf, b)
// Skip initial 7 bytes of response
- if len(buf) > 9 && buf[len(buf)-2] == '\x1b' && buf[len(buf)-1] == '\\' {
+ if len(buf) >= 9 && buf[len(buf)-2] == '\x1b' && buf[len(buf)-1] == '\\' {
buf = buf[:len(buf)-2]
break
}