Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/uu/more/src/more.rs
Original file line number Diff line number Diff line change
Expand Up @@ -837,8 +837,11 @@ impl<'a> Pager<'a> {
// Determine progress information to display
// - Show next file name when at EOF and there is a next file
// - Otherwise show percentage of the file read (if available)
let progress_info = if self.eof_reached && self.next_file.is_some() {
format!(" (Next file: {})", self.next_file.unwrap())
let progress_info = if self.eof_reached {
self.next_file
.as_ref()
.map(|next_file| format!(" (Next file: {next_file})"))
.unwrap_or_default()
} else if let Some(file_size) = self.file_size {
// For files, show percentage or END
let position = self
Expand Down
Loading