Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Tue, 18 Oct 2005 14:27:32 -0400 (EDT)
From: Igor Pechtchanski <pechtcha@cs.nyu.edu>
Reply-To: cygwin@cygwin.com
To: Robert Bram <Robert.Bram@colesmyer.com.au>
cc: cygwin@cygwin.com
Subject: RE: exiting vim changes background colour of console
In-Reply-To: <88ACCA0E0A7A914DAFBA3918021605D24E3FCF@WPEXCH08.colesmyer.ad.cmltd.net.au>
Message-ID: <Pine.GSO.4.63.0510181424410.23761@slinky.cs.nyu.edu>
References: <88ACCA0E0A7A914DAFBA3918021605D24E3FCF@WPEXCH08.colesmyer.ad.cmltd.net.au>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Tue, 18 Oct 2005, Robert Bram wrote:

> Hi Corinna,
>
> > > ==
> > > I am finding that when I exit from vim, it turns my background
> > > back into black (which is how I had it before I tried changing
> > > it today). Is there a setting or something I have forgotten to
> > > change?
> > > ==
> > > Actually this is happenning not just after vim.. but even after I exit
> > > "less"!
> >
> > Works for me.  Did you close the console window and re-open one after
> > changing the colors?  Before doing this, the console colors are known
> > to be scrambled as you describe above.
>
> Yes I closed and re-opened the console and the problem recurs. :-/

vim (and less, since you seem to have the same problem there) use
something called an "alternate screen".  This is a feature of the terminal
that allows the program to make arbitrary modifications to the terminal
screen that will be undone when the program switches back to the main
screen.  In particular, any color changes will be undone.  Consequently,
if you wish to change the color of the main screen, don't do this while
running vim or less.
HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

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

