delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/04/23/18:09:30

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:subject:to:references
:content-type; q=dns; s=default; b=UPVg+A+xsQ/iFfdR05CNhyfx1vCqu
llIa1+gFiIYNeBNb6fCM5xwTvH4G6LfBaXjc7NRbVd22D0oCgm0QMdLY7gAH3scJ
nepL+KD9vh01CWMlyCAZGsZZnTaT0yTEdzNOGV7nNT4h7Ls4Ub2QmkP6Ug5lNNKH
CdlgSXK7+Stwq8=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:subject:to:references
:content-type; s=default; bh=oq7mg5LVxPSkqTXre/bQ8eM34eA=; b=yqD
XiW6Rg35BqsD6QUnG3OKOJCcfC5Z+HLADDZs6GD77pU0g97SA/UTDunUV9NU1wSv
ykWRIseqWZAGOH/Nr/Fjsb6KQO2znSdBE6O0nSPaqjEe9lwDmqo3C8fisxSfg3cS
WDeMmlKIIVtQbvvD2Ad6OHLwdfNfr2xU83X2giWw=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=Penny, rice, penny, Vince
X-HELO: mail-io0-f176.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:subject:to:references :user-agent; bh=ujDu/FEuur4CT2Uxb9rWTlVpea1mwo/xivJbbATxS+E=; b=U6e80WghEu5W/IKAhCUWbqYZ8Gsm2W0JYnGccd0hc1PbD1tcsHfBTk5eV0GIRnTKJs wmj03gkUzSMtQp648Ls7jEHWPBzoklATlZP6hg7sUU5FoQD1f0xSsQrv3Ertef05sdyo SBGs4Mmuf+5g7T3Sem6Pq5RjxS7WQyLhPWhoeyHRZ4Is7VxIWOLBJhoeWORWxt8rHHxL 01c/5aYMRvoUZ6h9QR7noQ5BEDLOxGMEnJR3BTDMSt+mEgtbT6+HciukvC16O8P1Fkjx L1ycTx3ND9qoDN9Wm0E95Hrw2Oiajz0+ZKVzxZp4YRfLez3Qmv5KugBkLuDfz8/q5lue ZMMg==
X-Gm-Message-State: AN3rC/6VJ7a4wIEsl42Kd4dkibJ7NxM8isCNzNv+pYxRN7N/VhEPDPMy C7AT4FVpSkpzAOVz
X-Received: by 10.202.207.17 with SMTP id f17mr12559422oig.115.1492985351759; Sun, 23 Apr 2017 15:09:11 -0700 (PDT)
Message-ID: <58fd2606.4ca8ca0a.91abf.a636@mx.google.com>
Date: Sun, 23 Apr 2017 15:09:10 -0700 (PDT)
From: Steven Penny <svnpenn AT gmail DOT com>
X-Google-Original-From: Steven Penny
Subject: Re: Console buffer width always 1 column less than setting
To: cygwin AT cygwin DOT com
References: <9484061C-4B75-43A4-8E4D-44A6D07EE4AD AT solidrocksystems DOT com>
User-Agent: Tryst/2.0.1 (github.com/svnpenn/tryst)

On Sun, 5 Feb 2017 14:12:04, Vince Rice wrote:
>> On Sun, 05 Feb 2017 11:53:16, Steven Penny wrote:
>> This issue has bothered me for some time, but I never got around to reporting
>> it. The issue is that the Cygwin buffer via Cygwin.bat is always 1 less than
>> what is set.

>> For example, the default buffer is 80 columns, same as the window size.
>> Cygwin window size is correct, but that last column can never be accessed, it
>> always stays blank and the text wraps on column 79. Here is a test:

>> 1. Enter spaces until you reach next line, this way the prompt is not adding
>> to our count

>> 2. Enter:
>> 12345678901234567890123456789012345678901234567890123456789012345678901234567890

>> Now with cmd.exe, you get all 80 characters on the same line, but with Cygwin
>> it always wraps 1 character before. I don’t remember this always being the
>> case, I believe it used to work correct 1-2 years ago.

> I'm on Win7 64-bit with 64-bit Cygwin 2.6.0(0.304/5/3). To clarify, the above
> occurs with bash 4.3.46(7) in a Windows console, and I see the behavior there
> as well. This does not happen with the same bash in mintty 2.7, so it appears
> to be specific to the combination of bash and the Windows console.

http://cygwin.com/ml/cygwin/2017-02/msg00072.html

I found a fix to this problem. Create a file "cygwin-xenl.terminfo":

    cygwin-xenl|cygwin eat_newline_glitch,
      xenl,
      use=cygwin,

Compile and install the file:

    tic cygwin-xenl.terminfo

Add line to "~/.profile" or similar:

    TERM=cygwin-xenl

Interestingly, if you start via the shortcut (mintty), a different terminal is
used; one that already has xenl turned on:

    $ echo $TERM
    xterm

    $ infocmp xterm | grep xenl
    am, bce, km, mc5i, mir, msgr, npc, xenl,

Running Cygwin.bat with xterm is not a solution though, because xterm uses
different values for the key codes.

http://man7.org/linux/man-pages/man5/terminfo.5.html


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019