From 1eafc4e5d917e3b77f18807337b4ad770048a22a Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 16 Feb 2025 21:13:00 +0900 Subject: [PATCH] Ignore NULL byte before CSI 6N response Close #2455 --- src/tui/light.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tui/light.go b/src/tui/light.go index ad9e7274..acd07ab7 100644 --- a/src/tui/light.go +++ b/src/tui/light.go @@ -29,7 +29,7 @@ const ( const consoleDevice string = "/dev/tty" -var offsetRegexp = regexp.MustCompile("(.*)\x1b\\[([0-9]+);([0-9]+)R") +var offsetRegexp = regexp.MustCompile("(.*?)\x00?\x1b\\[([0-9]+);([0-9]+)R") var offsetRegexpBegin = regexp.MustCompile("^\x1b\\[[0-9]+;[0-9]+R") func (r *LightRenderer) Bell() {