Add default values for w, h, x and y

This commit is contained in:
Nikita Ivanov 2022-07-26 00:44:51 +05:00
parent 9e4011e808
commit 972efd368c
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133
2 changed files with 9 additions and 5 deletions

View File

@ -379,11 +379,6 @@ script environment:
.BR $y
and
.BR $id .
However, they are rarely used even by built-in previews and
are only set if corresponding arguments were passed to
.B ctpv
command (see
.IR SYNOPSIS ).
There are also
.B $m
and

View File

@ -214,6 +214,15 @@ static RESULT preview(int argc, char *argv[])
GET_PARG(y, 4);
GET_PARG(id, 5);
if (!w)
w = "80";
if (!h)
h = "40";
if (!x)
x = "0";
if (!y)
y = "0";
ERRCHK_RET_OK(init_previews());
struct InputFile input_f;