Date: Tue, 12 Dec 2017 10:26:10 -0700 From: Alan Somers <asomers@freebsd.org> Cc: Jamie Landeg-Jones <jamie@catflap.org>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, FreeBSD CURRENT <freebsd-current@freebsd.org>, by@meetlost.com Subject: Re: Strange behavior about pattern matching on manual pages [FIXED] Message-ID: <CAOtMX2jFmmER7GNhddxsk06COMOv-5qxwFdFiS3DPtRNQ1Yqag@mail.gmail.com> In-Reply-To: <CAOtMX2gD9VKSPaP_471d5t-7jfGqaRbB9-z9oo4t6LUu=y00cg@mail.gmail.com> References: <620CD9B7-201A-46FD-8C9D-DD8DDA3A05C3@meetlost.com> <201712062204.vB6M4B03026339@donotpassgo.dyslexicfish.net> <CAOtMX2hWLefYvC51w=1bb2=TodnkhjB2jH9Zb9xKFmKORxWvjQ@mail.gmail.com> <201712062235.vB6MZlQv034650@donotpassgo.dyslexicfish.net> <CAOtMX2gD9VKSPaP_471d5t-7jfGqaRbB9-z9oo4t6LUu=y00cg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 6, 2017 at 3:53 PM, Alan Somers <asomers@freebsd.org> wrote: > On Wed, Dec 6, 2017 at 3:35 PM, Jamie Landeg-Jones <jamie@catflap.org> > wrote: > >> Alan Somers <asomers@freebsd.org> wrote: >> >> > How about just setting MANPAGER=less in your environment? >> >> Because some of us prefer "more"? >> >> And as I said, it's related to searching using the more(1) command >> generally. >> >> I was under the impression that fixing bugs in existing commands was a >> better >> solution than telling someone to simply use something else. >> > > Yes, it certainly is. Are you sure this is actually a bug in less, or is > it just weird-but-intended behavior when less is emulating some old version > of more? It would be worth comparing our less sources to upstream's to see > what differences have crept in, and svn blaming them to see why. > I finally traced down the origin of this weird behavior. It dates from FreeBSD r60816, which imported NetBSD's r1.6 (from CVS), which fixed NetBSD PR 227. While your patch fixes the problem by@meetlost.com reported, it regresses the problem described by PR 227. So I don't think we can commit it as-is. http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.bin/less/less/Attic/forwback.c.diff?r1=1.5&r2=1.6&only_with_tag=MAIN&f=h https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=227 For reference, I'll restate a reproduction case for PR 227: 1) Size your terminal to 25 lines 2) jot 20 > ~/tmp/20lines.txt 3) jot 100 120 1 > /tmp/20lines.2.txt 4) more /tmp/20lines.* 5) At the prompt, press spacebar to display the second file. The first file should remain in the scrollback buffer. -Alan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2jFmmER7GNhddxsk06COMOv-5qxwFdFiS3DPtRNQ1Yqag>