X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 41E15385501B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=SystematicSw.ab.ca Authentication-Results: sourceware.org; spf=none smtp.mailfrom=systematicsw.ab.ca X-Authority-Analysis: v=2.4 cv=Ac10o1bG c=1 sm=1 tr=0 ts=610ee018 a=T+ovY1NZ+FAi/xYICV7Bgg==:117 a=T+ovY1NZ+FAi/xYICV7Bgg==:17 a=EsK34FSoenf5cgfM:21 a=IkcTkHD0fZMA:10 a=xNf9USuDAAAA:8 a=ejknC5xS72zp2OFXFO8A:9 a=QEXdDO2ut3YA:10 a=YJMnI0FBlXBVzWxbAmmr:22 a=SEwjQc04WA-l_NiBhQ7s:22 To: cygwin AT cygwin DOT com References: From: Brian Inglis Organization: Systematic Software Subject: Re: Display text file using less in Cygwin terminal or xterm incorrect when lines are longer than window width Message-ID: Date: Sat, 7 Aug 2021 13:33:43 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-CA X-CMAE-Envelope: MS4xfCQo/KO9swnThK5Qn4okOTr2NqAoHlZyxWl6k5mQyhFqRSAjKD7ka96uZKoUqDXeQSq/CO3Px413XSSVWcldXY3qHhxRGuAMy6iivPnvDv5zzEvwpt1R Ngsdr2zebNMSahlE3aAO+wcE8J6n3JIGwLZQGV2GkYhqJPGyHG3IFLO5YUYs6jkbrPSeNScCMr8/6tlkcI+WeLUa15H4RL9HTu8= X-Spam-Status: No, score=-1161.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: cygwin AT cygwin DOT com Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On 2021-08-06 23:28, C Linus Hicks via Cygwin wrote: > I have used Cygwin and CygwinX for many years and this problem has > persisted for many of those years, I can't remember the last time > this worked. > > Using vim in an xterm or terminal window displays text in a file > properly. > > The problem with less is easy to reproduce, but there are several > different problems: > > Create a text file with the following characteristics: > > 1. Several lines are longer then your terminal window is wide, even > several times as wide. > 2. The file has fewer lines then your terminal window. > > In this case, when you first open the file with less, assuming all > the lines will fit in your window you will see the entire file in the > bottom of your window. If you hit the 'g' key, it will jump to the > top, but one or more lines at the top will be missing. Works Just Fine For Me! With files as described, and LESS/-OPEN/-CLOSE unset, running /usr/bin/less, the first file is displayed with the end of its bottom line on the bottom line of the window, just above the less status line; pressing Home/End displays start of top line at top, or end of bottom line at bottom of window, "G" displays end of bottom line at bottom of window; no lines or characters missing; subsequent files in same run after :n, displayed with start of top line at top of window; pressing Home/End displays start of top line at top, or end of bottom line at bottom of window, "G" displays end of bottom line at bottom of window; no lines or characters missing. With settings below, first file displayed with start of top line at top of window; pressing Home/End displays start of top line at top, or end of bottom line at bottom of window, "G" displays end of bottom line at bottom of window; no lines or characters missing. > If you add more lines to the file but still with fewer lines then > lines in your display window, but the number of lines that should be > displayed when wrapped is greater than your window, then you will get > different behavior. And if your file has more lines than than the > window, still different. > > I can't find any reports or maybe I just gave up searching because > the hits don't address my issue, and using less on my Linux machine > doesn't have these problems. I get the same behaviour with no/same settings and no issues under Linux. > Is there a setting I am missing, or is this just a bug? As requested for problem reporting, please attach the file with the output from "cygcheck -hrsv" as text, if nothing below helps. Make sure everything is up to date with no package issues: see output from above. Are you running under Cygwin 64, or 32 with no rebase issues, and no other issues shown in /var/log/setup.log.full? $ less --version less 581.2 (PCRE2 regular expressions) Copyright (C) 1984-2021 Mark Nudelman ... $ set | egrep LESS\|TERM LESS='-c -R -M -PM?P%Pb\% %lb/%L.?p %pb\% %bb/%B.?f %f.?m %i/%m.?x %x.' LESSCLOSE='/usr/local/bin/lesspipe %s %s' LESSOPEN='| /usr/local/bin/lesspipe %s' TERM=xterm-256color TERM_PROGRAM=mintty TERM_PROGRAM_VERSION=3.5.0 $ cygcheck -c less libncursesw10 libpcre2_8_0 cygwin Cygwin Package Information Package Version Status cygwin 3.2.0-1 OK less 581.2-1 OK libncursesw10 6.1-1.20190727 OK libpcre2_8_0 10.37-1 OK $ head /proc/version CYGWIN_NT-10.0-19042 version 3.2.0-340.x86_64 (corinna AT calimero) (gcc version 9.3.0 20200312 (Fedora Cygwin 9.3.0-1) (GCC) ) 2021-03-29 08:42 UTC Debian 32 VM: $ less --version less 487 (GNU regular expressions) Copyright (C) 1984-2016 Mark Nudelman ... $ set | egrep LESS\|TERM COLORTERM=truecolor LESS='-c -R -M -PM?P%Pb\% %lb/%L.?p %pb\% %bb/%B.?f %f.?m %i/%m.?x %x.' LESSCLOSE='/usr/bin/lesspipe %s %s' LESSOPEN='| /usr/bin/lesspipe %s' TERM=xterm-256color $ apt list less libncursesw6 libpcre2-8-0 Listing... Done less/stable,stable,stable,stable,stable,stable,stable,now 487-0.1+b1 i386 [installed,automatic] libncursesw6/stable,stable,stable,stable,stable,stable,stable,now 6.1+20181013-2+deb10u2 i386 [installed,automatic] libpcre2-8-0/stable,stable,stable,stable,stable,stable,stable,now 10.32-5 i386 [installed,automatic] $ head /proc/version Linux version 5.4.0-0.bpo.2-686-pae (debian-kernel AT lists DOT debian DOT org) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 5.4.8-1~bpo10+1 (2020-01-07) -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. [Data in binary units and prefixes, physical quantities in SI.] -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple