summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2024-08-14 19:16:48 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2024-08-14 19:19:28 +0900
commit581734c369befcc6544b927042e116e0343a366a (patch)
tree9ebdbf073f1d389827da20d222f7eb1be1f0c699
parentd90a969c00401a11d86a238eef29048dea42398a (diff)
Fix OSC 8 parser
-rw-r--r--src/ansi.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ansi.go b/src/ansi.go
index 65168f7e..638d7eff 100644
--- a/src/ansi.go
+++ b/src/ansi.go
@@ -355,7 +355,7 @@ func interpretCode(ansiCode string, prevState *ansiState) ansiState {
if ansiCode[0] != '\x1b' || ansiCode[1] != '[' || ansiCode[len(ansiCode)-1] != 'm' {
if prevState != nil && strings.HasSuffix(ansiCode, "0K") {
state.lbg = prevState.bg
- } else if ansiCode == "\x1b]8;;\x1b" { // End of a hyperlink
+ } else if ansiCode == "\x1b]8;;\x1b\\" { // End of a hyperlink
state.url = nil
} else if strings.HasPrefix(ansiCode, "\x1b]8;") && strings.HasSuffix(ansiCode, "\x1b\\") {
if paramsEnd := strings.IndexRune(ansiCode[4:], ';'); paramsEnd >= 0 {