delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/10/05/17:13:03

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Date: Mon, 5 Oct 2009 14:12:25 -0700
From: Gary Johnson <garyjohn AT spocom DOT com>
To: cygwin AT cygwin DOT com
Subject: No CRs in :! command output from vim in rxvt
Message-ID: <20091005211225.GB3860@KCJs-Computer>
Mail-Followup-To: cygwin AT cygwin DOT com
Mime-Version: 1.0
User-Agent: Mutt/1.4.2.2i
X-IsSubscribed: yes
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

When I run vim in an rxvt terminal, and I execute a shell command
such as

    :!ls

there are no carriage returns in the output, only line feeds at the
ends of the lines, so the lines stair-step across the terminal
window.

This has been a problem for as long as I've been using vim on
Cygwin.  The problem is in vim 7.2.148 I compiled myself on Cygwin
1.5, and in the official vim 7.2.264 package just released for
Cygwin 1.7.  On 1.5 I'm using rxvt package version 20050409-11 and
on 1.7 I'm using rxvt 20050409-21.

Using my Cygwin 1.7 system, the output from stty -a is:

    :!stty -a
    speed 38400 baud; rows 24; columns 80; line = 0;
    intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
    eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
    werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
    -parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
    -ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
    -iuclc -ixany imaxbel
    opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
    isig icanon iexten echo echoe echok -echonl -noflsh -tostop echoctl echoke
                                                                                 
where I've cleaned up the missing CR problem for clarity.  I would
think that the 'onlcr' setting would cause the output to include CRs
at the end of each line, but it doesn't.  I also tried setting
'onlret' before running vim, but it doesn't seem to have any effect,
either.

I've captured the output of the ":!ls" command by running script
before starting vim and I can see that each line ends with a newline
and no carriage return.

This looks to me like a problem with rxvt rather than with vim, but
I'm not sure.  In any case, does anyone know of a solution, other
than piping all such commands through u2d?  Thanks.

Regards,
Gary



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