Skip to content

Commit

Permalink
Ignore NULL byte before CSI 6N response
Browse files Browse the repository at this point in the history
Close #2455
  • Loading branch information
junegunn committed Feb 16, 2025
1 parent 38e4020 commit 1eafc4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tui/light.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 1eafc4e

Please sign in to comment.