Skip to content

Commit d3f646a

Browse files
authored
fix: truncate label selector input to max length (#3300)
1 parent e4e3816 commit d3f646a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/ui/table.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,8 @@ func (t *Table) styleTitle() string {
562562
if internal.IsLabelSelector(buff) {
563563
sel, err := TrimLabelSelector(buff)
564564
if err != nil {
565+
buff = render.Truncate(buff, maxTruncate)
566+
} else if sel != nil {
565567
buff = render.Truncate(sel.String(), maxTruncate)
566568
}
567569
} else if l := t.GetModel().GetLabelSelector(); l != nil && !l.Empty() {

0 commit comments

Comments
 (0)