Skip to content

Commit

Permalink
chore(tui): only display copy message for non-empty selection
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-olszewski committed Jul 24, 2024
1 parent e28dfd8 commit 803fac7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/turborepo-ui/src/tui/term_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ impl<W> TerminalOutput<W> {
}

pub fn has_selection(&self) -> bool {
self.parser.screen().selected_text().is_some()
self.parser
.screen()
.selected_text()
.map_or(false, |s| !s.is_empty())
}

pub fn handle_mouse(&mut self, event: crossterm::event::MouseEvent) -> Result<(), Error> {
Expand Down

0 comments on commit 803fac7

Please sign in to comment.