From owner-freebsd-current@freebsd.org Thu Dec 14 16:39:29 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CA85E86806; Thu, 14 Dec 2017 16:39:29 +0000 (UTC) (envelope-from jamie@catflap.org) Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [IPv6:2001:19f0:300:2185:a:dead:bad:faff]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16BB06BCB6; Thu, 14 Dec 2017 16:39:28 +0000 (UTC) (envelope-from jamie@catflap.org) Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [104.207.135.49]) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5) with ESMTP id vBEGdQ1T068839; Thu, 14 Dec 2017 16:39:27 GMT (envelope-from jamie@donotpassgo.dyslexicfish.net) Received: (from jamie@localhost) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5/Submit) id vBEGdQYx068838; Thu, 14 Dec 2017 16:39:26 GMT (envelope-from jamie) From: Jamie Landeg-Jones Message-Id: <201712141639.vBEGdQYx068838@donotpassgo.dyslexicfish.net> Date: Thu, 14 Dec 2017 16:39:26 +0000 Organization: Dyslexic Fish To: asomers@freebsd.org Cc: jamie@catflap.org, freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, by@meetlost.com Subject: Re: Strange behavior about pattern matching on manual pages [FIXED] References: <620CD9B7-201A-46FD-8C9D-DD8DDA3A05C3@meetlost.com> <201712062204.vB6M4B03026339@donotpassgo.dyslexicfish.net> <201712062235.vB6MZlQv034650@donotpassgo.dyslexicfish.net> In-Reply-To: User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (donotpassgo.dyslexicfish.net [104.207.135.49]); Thu, 14 Dec 2017 16:39:27 +0000 (GMT) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 16:39:29 -0000 Alan Somers wrote: > > 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. Firstly, apologies for the delay in replying - I've been away. I was planning on investigating further, which is why I hadn't yet formally submitted it. Your info would have been a useful next step to follow, so cheers. > 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. Thanks for doing that. Of course, it's fine to not apply the patch as in this case. > 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. Thanks again. I'll check the PR's, other patches, and your test-case will help greatly. I'll post again when I find a better overall solution. Cheers! Jamie