diff --git a/cmd/frostfs-lens/internal/tuiutil/multipage-view.go b/cmd/frostfs-lens/internal/tuiutil/multipage-view.go index 99a9d2a85..15620fe3e 100644 --- a/cmd/frostfs-lens/internal/tuiutil/multipage-view.go +++ b/cmd/frostfs-lens/internal/tuiutil/multipage-view.go @@ -141,22 +141,14 @@ func (v *MultipageView) draw(screen tcell.Screen) { } v.DrawForSubclass(screen, v) - deltaY := 0 for index := v.firstItemIndex; index < v.lastItemIndex; index++ { - deltaX := 0 - for i, char := range v.items[index].Text { - if i == width { - break - } - - if index == v.selectedItemIndex { - screen.SetContent(x+deltaX, y+deltaY, char, nil, v.selectedTextStyle) - } else { - screen.SetContent(x+deltaX, y+deltaY, char, nil, v.mainTextStyle) - } - deltaX++ + text := v.items[index].Text + if index == v.selectedItemIndex { + text = fmt.Sprintf("[:white]%s[:black]", text) } - deltaY++ + tview.Print(screen, text, x, y, width, tview.AlignLeft, tcell.ColorWhite) + + y++ } v.SetTitle(title) }