Skip to content

Commit

Permalink
Fix width used for line numbers (#1151)
Browse files Browse the repository at this point in the history
  • Loading branch information
joelim-work authored Mar 12, 2023
1 parent db9de4d commit 0bf17dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ func (win *win) printDir(screen tcell.Screen, dir *dir, context *dirContext, dir
if gOpts.number && gOpts.relativenumber {
lnwidth++
}
for j := 10; j < len(dir.files); j *= 10 {
for j := 10; j <= len(dir.files); j *= 10 {
lnwidth++
}
lnformat = fmt.Sprintf("%%%d.d ", lnwidth)
Expand Down

0 comments on commit 0bf17dd

Please sign in to comment.