Re: Console buffer width always 1 column less than setting
- Date: Sun, 23 Apr 2017 15:09:10 -0700 (PDT)
- From: Steven Penny <svnpenn@xxxxxxxxx>
- Subject: Re: Console buffer width always 1 column less than setting
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
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.
I found a fix to this problem. Create a file "cygwin-xenl.terminfo":
Compile and install the file:
Add line to "~/.profile" or similar:
Interestingly, if you start via the shortcut (mintty), a different terminal is
used; one that already has xenl turned on:
$ echo $TERM
$ 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.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple