less
less copied to clipboard
`-#`/`--shift` option no longer seems to work
Ever since upgrading from less-643 to less-661, I noticed that the -#/--shift option no longer seems to have any effect, and instead the default value of .5 is used. The functionality still works properly as I can set the option from within less with the -- command.
Steps to Reproduce
-
Run this command in a POSIX shell:
for i in (seq 1 $COLUMNS); echo -n X; end | less --shift=.1 -
Hit the
→(right arrow) key once. -
Notice that the screen moves by 1/2 the screen width instead of 1/10 width as specified.
Note: this failed only if the parameter begins with a dot. less --shift=4 would work correctly.
Fixed in 5701f020f94fb72be809f9465265fc11d3d990b0.
Ah, I didn't think to test any non-dot-prefixed values. Thank you!