mirror of
https://github.com/asciinema/asciinema.git
synced 2025-12-15 19:28:00 +01:00
Fix legacy --cols and --rows options for winsize overriding
This commit is contained in:
@@ -99,10 +99,10 @@ pub struct Record {
|
||||
pub tty_size: Option<(Option<u16>, Option<u16>)>,
|
||||
|
||||
#[arg(long, hide = true)]
|
||||
cols: Option<u16>,
|
||||
pub cols: Option<u16>,
|
||||
|
||||
#[arg(long, hide = true)]
|
||||
rows: Option<u16>,
|
||||
pub rows: Option<u16>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Args)]
|
||||
|
||||
@@ -148,6 +148,8 @@ impl cli::Record {
|
||||
|
||||
fn get_tty(&self) -> Result<FixedSizeTty> {
|
||||
let (cols, rows) = self.tty_size.unwrap_or((None, None));
|
||||
let cols = cols.or(self.cols);
|
||||
let rows = rows.or(self.rows);
|
||||
|
||||
if self.headless {
|
||||
Ok(FixedSizeTty::new(tty::NullTty::open()?, cols, rows))
|
||||
|
||||
Reference in New Issue
Block a user