From 0217d62e6aec1eefe63d0adfe6eb88da47108fdd Mon Sep 17 00:00:00 2001 From: Mikhail Shamne Date: Sat, 19 Sep 2026 02:01:23 +0300 Subject: [PATCH] tui: drop a useless assignment in the prompt renderer CodeQL (go/useless-assignment-to-local) flagged the result of the second screen.Text call, which nothing read. Assign the label position once and use it directly. --- internal/tui/views.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/tui/views.go b/internal/tui/views.go index 762b75a..896a5c2 100644 --- a/internal/tui/views.go +++ b/internal/tui/views.go @@ -1627,11 +1627,9 @@ func (a *App) renderPrompt(row int) { for x := 1; x < a.W-1; x++ { a.screen.Set(x, row, ' ', t.Base) } - x := 2 - x = a.screen.Text(x, row, p.Label+": ", t.Accent) - valStart := x + valStart := a.screen.Text(2, row, p.Label+": ", t.Accent) text := p.text() - x = a.screen.Text(x, row, Truncate(text, a.W-valStart-4), t.Base) + a.screen.Text(valStart, row, Truncate(text, a.W-valStart-4), t.Base) if p.Hint != "" { hint := Truncate(p.Hint, maxInt(0, a.W-valStart-TextWidth(text)-6)) if hint != "" {