mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-24 22:28:29 +00:00
Fix themes kitten not displaying colors in narrow windows
The themes kitten used the truncated color name when formatting the colors themselves, which leads to broken coloring when the window is narrow enough to cause truncation to occur.
This commit is contained in:
parent
e45d518082
commit
87a9a60442
1 changed files with 4 additions and 3 deletions
|
|
@ -451,10 +451,11 @@ func (self *handler) draw_theme_demo() {
|
|||
if intense {
|
||||
s = "bright-" + s
|
||||
}
|
||||
if len(s) > trunc {
|
||||
s = s[:trunc]
|
||||
sTrunc := s
|
||||
if len(sTrunc) > trunc {
|
||||
sTrunc = sTrunc[:trunc]
|
||||
}
|
||||
buf.WriteString(self.lp.SprintStyled("fg="+s, s))
|
||||
buf.WriteString(self.lp.SprintStyled("fg="+s, sTrunc))
|
||||
buf.WriteString(" ")
|
||||
}
|
||||
text := strings.TrimSpace(buf.String())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue