Skip to content

less --window=-4 no longer works, gives error: Negative number not allowed in window=-4 #709

@gibfahn

Description

@gibfahn

Example repro using homebrew-installed less:

LESS= less --window=-4
Negative number not allowed in window=-4
Missing filename ("less --help" for help)less --version
less 691 (PCRE2 regular expressions)

The man page still states that this option can be negative, and this feature works great in older versions of less:

less/less.nro.VER

Lines 1613 to 1628 in 92b9623

.IP "\fB\-z\fP\fIn\fP or \fB\-\-window=\fP\fIn\fP or \-\fIn\fP"
Changes the default scrolling window size to \fIn\fP lines.
The default is one screenful.
The z and w commands can also be used to change the window size.
The "z" may be omitted for compatibility with some versions of
.BR more (1).
If the number
.I n
is negative, it indicates
.I n
lines less than the current screen size.
For example, if the screen is 24 lines,
.B "\-z\-4"
sets the
scrolling window to 20 lines. If the screen is resized to 40 lines,
the scrolling window automatically changes to 36 lines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions