delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/10/19/02:45:20

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Wed, 19 Oct 2005 08:44:57 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: exiting vim changes background colour of console
Message-ID: <20051019064457.GC9127@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <88ACCA0E0A7A914DAFBA3918021605D24E3FD0 AT WPEXCH08 DOT colesmyer DOT ad DOT cmltd DOT net DOT au>
Mime-Version: 1.0
In-Reply-To: <88ACCA0E0A7A914DAFBA3918021605D24E3FD0@WPEXCH08.colesmyer.ad.cmltd.net.au>
User-Agent: Mutt/1.4.2i

On Oct 19 08:29, Robert Bram wrote:
> > > > > 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,
> 
> I admit to being somewhat confused by your remark - I didn't change the screen while running vim or less. I edited the properties of the console so that it would affect all consoles with the same name, changed the PS1 environment variable in my .bash_profile, closed the console, re-opened it, ran vim and/or less, exited vim and/or less and then found the console colors changed. Have I misunderstood your point?
> 
> Interestingly, I find that I can keep pressing ENTER and 'clear' the screen back to how it was, but this is an ugly solution.

That's strange.  My first action after creating the desktop icon to start
a local Cygwin console is to change the cursor shape ("large"), the font
(Lucida Console, 12pt) and the fore- and background colors (black on grey)
in the shortcut pointing to the cygwin.bat script.  I don't see what you
see, the colors are..., well, "stable".  The colors are only scrambled up
while still running in the console window in which I made the changes.
I have no idea what could be different in your setup, sorry.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat, Inc.

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

- Raw text -


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