Skip to content

Commit

Permalink
Fix paging not happening when stdout is interactive but stdin is not
Browse files Browse the repository at this point in the history
  • Loading branch information
Nigecat authored and Enselic committed May 22, 2023
1 parent b420c42 commit 149dec6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bin/bat/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ impl App {
// If we are reading from stdin, only enable paging if we write to an
// interactive terminal and if we do not *read* from an interactive
// terminal.
if self.interactive_output && std::io::stdin().is_terminal() {
if self.interactive_output && !std::io::stdin().is_terminal() {
PagingMode::QuitIfOneScreen
} else {
PagingMode::Never
Expand Down

0 comments on commit 149dec6

Please sign in to comment.