Skip to content

Commit

Permalink
Change to CSI 0K or CSI K to take over the style
Browse files Browse the repository at this point in the history
  • Loading branch information
noborus committed Nov 7, 2024
1 parent c676eed commit 51d7ea1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions oviewer/convert_es.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ func (es *escapeSequence) convert(st *parseState) bool {
case mainc == 'm':
st.style = csToStyle(st.style, es.parameter.String())
case mainc == 'K':
if es.parameter.String() != "1" {
// Clear line.
// CSI 0 K or CSI K maintains the style after the newline
// (can change the background color of the line).
params := es.parameter.String()
if params == "" || params == "0" {
st.eolStyle = st.style
}
case mainc >= 'A' && mainc <= 'T':
Expand Down

0 comments on commit 51d7ea1

Please sign in to comment.