less: allow use of last column of terminal
authorRon Yorston <rmy@pobox.com>
Fri, 24 Jul 2015 13:29:45 +0000 (14:29 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 31 Jul 2015 14:22:09 +0000 (16:22 +0200)
commit1ecb996fd2641e6ad3fdf07e78781823c71fcf13
tree57dc2275e2eb53c5f24b359dc405d9bf2fd4c3be
parentd542d183e10dde1168fa85751194839c67add7fe
less: allow use of last column of terminal

When read_lines tests whether a character will fit on the current
line it checks the *next* character but in case of overflow doesn't
display the *current* one.  This results in the last column of the
terminal never being used.

The test in re_wrap (used when the terminal width changes or line
numbers are enabled/disabled) is different:  it does allow the use
of the final column.

function                                             old     new   delta
read_lines                                           764     770      +6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 6/0)                 Total: 6 bytes

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/less.c