Skip to content

Commit 3ae0e1a

Browse files
committed
fix: Increase widt to allow 4 digit scores
1 parent 7743a18 commit 3ae0e1a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/internal/ui/zoxide/model.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,13 @@ func (m *Model) renderResultList(r *rendering.Renderer) {
174174
func (m *Model) renderVisibleResults(r *rendering.Renderer, endIndex int) {
175175
for i := m.renderIndex; i < endIndex; i++ {
176176
result := m.results[i]
177-
scoreTxt := fmt.Sprintf("%.1f", result.Score)
178177

179178
// Truncate path if too long (account for score, separator, and padding)
180179
// Available width: modal width - borders(2) - padding(2) - score(5) - separator(3) = width - 12
181180
availablePathWidth := m.width - 12
182181
path := common.TruncateTextBeginning(result.Path, availablePathWidth, "...")
183182

184-
line := fmt.Sprintf(" %6s | %s", scoreTxt, path)
183+
line := fmt.Sprintf(" %6.1f | %s", result.Score, path)
185184

186185
// Highlight the selected item
187186
if i == m.cursor {

0 commit comments

Comments
 (0)