mirror of
https://github.com/asciinema/asciinema.git
synced 2025-12-16 03:38:03 +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>)>,
|
pub tty_size: Option<(Option<u16>, Option<u16>)>,
|
||||||
|
|
||||||
#[arg(long, hide = true)]
|
#[arg(long, hide = true)]
|
||||||
cols: Option<u16>,
|
pub cols: Option<u16>,
|
||||||
|
|
||||||
#[arg(long, hide = true)]
|
#[arg(long, hide = true)]
|
||||||
rows: Option<u16>,
|
pub rows: Option<u16>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Args)]
|
#[derive(Debug, Args)]
|
||||||
|
|||||||
@@ -148,6 +148,8 @@ impl cli::Record {
|
|||||||
|
|
||||||
fn get_tty(&self) -> Result<FixedSizeTty> {
|
fn get_tty(&self) -> Result<FixedSizeTty> {
|
||||||
let (cols, rows) = self.tty_size.unwrap_or((None, None));
|
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 {
|
if self.headless {
|
||||||
Ok(FixedSizeTty::new(tty::NullTty::open()?, cols, rows))
|
Ok(FixedSizeTty::new(tty::NullTty::open()?, cols, rows))
|
||||||
|
|||||||
Reference in New Issue
Block a user