diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2024-08-14 19:16:48 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2024-08-14 19:19:28 +0900 |
commit | 581734c369befcc6544b927042e116e0343a366a (patch) | |
tree | 9ebdbf073f1d389827da20d222f7eb1be1f0c699 | |
parent | d90a969c00401a11d86a238eef29048dea42398a (diff) |
Fix OSC 8 parser
-rw-r--r-- | src/ansi.go | 2 |
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 { |