X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7124F39B90B4
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1628314122;
	bh=h9wscGDSvlJFDGkjdndSuOu9BXTlB2lAw5iQfnw/gTw=;
	h=Subject:To:Date:List-Id:List-Unsubscribe:List-Archive:List-Post:
	 List-Help:List-Subscribe:From:Reply-To:From;
	b=LmN9aoPXhpTQduchx4BRc4BjJHVnssXgN7ii984XGRdewjHKOLq8z6NSvWfC15Eni
	 C5mZOFcAMKyDo0uLqyTDJegSmH30VamkyE7yw1tUDlii15uaoBb3cLl50TFMTT85Lx
	 rsZBhEy+kF0Zx8NXlAXw3KNN36YXIdrerwrivqKg=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 56D5E383980B
Message-ID: <f89f36a9b6c260b0c602336473a37c216f04a0c8.camel@mindspring.com>
Subject: Display text file using less in Cygwin terminal or xterm incorrect
 when lines are longer then window width
To: cygwin@cygwin.com
Date: Sat, 07 Aug 2021 01:28:09 -0400
X-Mailer: Evolution 3.28.5 (3.28.5-16.el8) 
Mime-Version: 1.0
X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, SPF_HELO_NONE, SPF_PASS,
 TXREP autolearn=ham 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@cygwin.com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: C Linus Hicks via Cygwin <cygwin@cygwin.com>
Reply-To: C Linus Hicks <linush@mindspring.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>

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.

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.

Is there a setting I am missing, or is this just a bug?

Thanks for any help.
Linus



-- 
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
