diff --git a/crates/nu-command/src/viewers/table.rs b/crates/nu-command/src/viewers/table.rs index e1c7b8d30d..72b6be8938 100644 --- a/crates/nu-command/src/viewers/table.rs +++ b/crates/nu-command/src/viewers/table.rs @@ -1725,8 +1725,14 @@ impl Iterator for PagingTableCreator { Some(Ok(bytes)) } Ok(None) => { - let term_width = get_width_param(self.width_param); - let msg = format!("Couldn't fit table into {} columns!", term_width); + let msg = if nu_utils::ctrl_c::was_pressed(&self.ctrlc) { + "".into() + } else { + // assume this failed because the table was too wide + // TODO: more robust error classification + let term_width = get_width_param(self.width_param); + format!("Couldn't fit table into {} columns!", term_width) + }; Some(Ok(msg.as_bytes().to_vec())) } Err(err) => Some(Err(err)),