mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Fix bold/dim handling when wrapping
This commit is contained in:
@@ -167,8 +167,12 @@ func (self *sgr_state) apply_csi(raw string) {
|
|||||||
self.reset()
|
self.reset()
|
||||||
case 1:
|
case 1:
|
||||||
self.dim, self.bold = false, true
|
self.dim, self.bold = false, true
|
||||||
|
case 221:
|
||||||
|
self.bold = false
|
||||||
case 2:
|
case 2:
|
||||||
self.dim, self.bold = true, false
|
self.dim, self.bold = true, false
|
||||||
|
case 222:
|
||||||
|
self.dim = false
|
||||||
case 22:
|
case 22:
|
||||||
self.dim, self.bold = false, false
|
self.dim, self.bold = false, false
|
||||||
case 3:
|
case 3:
|
||||||
|
|||||||
@@ -37,4 +37,10 @@ func TestFormatWithIndent(t *testing.T) {
|
|||||||
tx("four", "fou\nr")
|
tx("four", "fou\nr")
|
||||||
tx("nl\n\n", "nl\n\n")
|
tx("nl\n\n", "nl\n\n")
|
||||||
tx("four\n\n", "fou\nr\n\n")
|
tx("four\n\n", "fou\nr\n\n")
|
||||||
|
|
||||||
|
screen_width = 8
|
||||||
|
tx(
|
||||||
|
"\x1b[1mbold\x1b[221m no more bold",
|
||||||
|
"\x1b[1mbold\x1b[221m no\nmore\nbold",
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user