Skip to content
Myr

Fix OSC 8 parser

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent d90a969 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/ansi.go+1 added-1 removed
353 unmodified lines
354 }355 if ansiCode[0] != '\x1b' || ansiCode[1] != '[' || ansiCode[len(ansiCode)-1] != 'm' {356 if prevState != nil && strings.HasSuffix(ansiCode, "0K") {357 state.lbg = prevState.bg358 } else if ansiCode == "\x1b]8;;\x1b" { // End of a hyperlink358 } else if ansiCode == "\x1b]8;;\x1b\\" { // End of a hyperlink359 state.url = nil360 } else if strings.HasPrefix(ansiCode, "\x1b]8;") && strings.HasSuffix(ansiCode, "\x1b\\") {361 if paramsEnd := strings.IndexRune(ansiCode[4:], ';'); paramsEnd >= 0 {362 params := ansiCode[4 : 4+paramsEnd]
117 unmodified lines