Skip to content

Commit

Permalink
Use third
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Dec 9, 2021
1 parent 6f513fb commit 1110000
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ func (m *model) View() string {
return "No files"
}

// If it's possible to fit all files in one column on half of screen, just use one column.
// Otherwise, let's squeeze listing in half of screen.
m.columns = len(m.files) / (m.height / 2)
// If it's possible to fit all files in one column on a third of the screen,
// just use one column. Otherwise, let's squeeze listing in half of screen.
m.columns = len(m.files) / (m.height / 3)
if m.columns <= 0 {
m.columns = 1
}
Expand Down

0 comments on commit 1110000

Please sign in to comment.