annoying behavior in less(1) after v403 import

Tom Uffner tom at
Sat Jun 16 07:36:22 UTC 2007

Tom Uffner wrote:
> the recently imported new version of less (Mon Jun 4 01:42:44 2007 UTC
> (10 days, 19 hours ago) by delphij) appears to have a bug that appears
> when using the -e or --quit-at-eof option.

to see this bug, you also need the 'c' & 'w' options, and output that is
more than one screen long. for example:

[tatooine:/usr/src/contrib/less:ttyp4] less -ecw scrsize.c

(hit space until you reach the last page, then one more time)

less exits leaving your cursor near the top of screen in the middle of
the text that was displayed there, and does not correctly restore the
terminal settings:

                 return 1;
                 return 1;
         if (!(hints.flags & PResizeInc))
                 return 1;
         if (hints.width_inc == 0 || hints.height_inc == 0)
                 return 1;
         if (!(hints.flags & (PBaseSize|PMinSize)))
                 return 1;
         if (hints.flags & PBaseSize)

More information about the freebsd-current mailing list