bash + vim color background bug

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

bash + vim color background bug

Peta
* issue:
after setting a colorscheme, vim does not automatically reset the
background when the editor quits.

I am forced to manually run
$ echo -e '\E[m'
to reset the colors.

* affects:
- version 7.2.108 on mac [snow leopard defaults]
- version 7.0.237 on rhel [default]

* how to replicate:
launch vim
: colorscheme torte
: quit

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: bash + vim color background bug

Nikolay Aleksandrovich Pavlov
Reply to message «bash + vim color background bug»,
sent 20:07:45 18 October 2010, Monday
by Peta:

Vim-7.3, Gentoo, urxvtc+screen. Unable to reproduce the problem in zsh (even
with empty PS1 variable) and bash in interactive mode (again, even with empty
PS1). Reproducible into bash in non-interactive mode (for some reason this is
the default for bash on my system). Try adding $'\E[m' at the start of the PS1
variable that controls prompt.

Original message:

> * issue:
> after setting a colorscheme, vim does not automatically reset the
> background when the editor quits.
>
> I am forced to manually run
> $ echo -e '\E[m'
> to reset the colors.
>
> * affects:
> - version 7.2.108 on mac [snow leopard defaults]
> - version 7.0.237 on rhel [default]
>
> * how to replicate:
> launch vim
>
> : colorscheme torte
> : quit

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: bash + vim color background bug

Bram Moolenaar
In reply to this post by Peta

Peta wrote:

> * issue:
> after setting a colorscheme, vim does not automatically reset the
> background when the editor quits.
>
> I am forced to manually run
> $ echo -e '\E[m'
> to reset the colors.
>
> * affects:
> - version 7.2.108 on mac [snow leopard defaults]
> - version 7.0.237 on rhel [default]
>
> * how to replicate:
> launch vim
> : colorscheme torte
> : quit

It works fine for me in an xterm.

It may be a problem with your terminal in combination with the terminal
settings, e.g. $TERM.

--
DINGO:   You must spank her well and after you have spanked her you
         may deal with her as you like and then ... spank me.
AMAZING: And spank me!
STUNNER: And me.
LOVELY:  And me.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: bash + vim color background bug

Nikolay Aleksandrovich Pavlov
Reply to message «Re: bash + vim color background bug»,
sent 00:04:35 19 October 2010, Tuesday
by Bram Moolenaar:

> It works fine for me in an xterm.
>
> It may be a problem with your terminal in combination with the terminal
> settings, e.g. $TERM.
It is probably not since I can reproduce this behavior in non-interactive bash
(it is the default mode for bash on my system) and also in non-interactive zsh
(if it is invoked with --nointeractive) and cannot do this with interactive
versions.

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: bash + vim color background bug

Sung Pae
In reply to this post by Nikolay Aleksandrovich Pavlov
Peta wrote:

> Vim-7.3, Gentoo, urxvtc+screen

Do you have `defbce on' in your screenrc? (background-color-erase)

Your $TERM should be set to `screen-{16,256}color-bce' and you should also have the corresponding term{cap,info} entry.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: bash + vim color background bug

Nikolay Aleksandrovich Pavlov
Reply to message «Re: bash + vim color background bug»,
sent 00:31:07 19 October 2010, Tuesday
by Sung Pae:

> Do you have `defbce on' in your screenrc? (background-color-erase)
>
> Your $TERM should be set to `screen-{16,256}color-bce' and you should also
> have the corresponding term{cap,info} entry.
No, and setting this option in running screen (with `bce on') makes the
following change: if I type `tty<CR>' after I exit vim, I get altered background
color only on the `tty' and the following `/dev/pts/N' text. If this option is
on, I get altered background on the whole two lines (including blank space after
the text). TERM is set to `screen-256color' (without bce), setting it to
`screen-256color-bce' does not invoke any visible changes. Terminfo entries do
exist.

// By the way, why are you asking me? I experience this problem only if I launch
// vim from the non-interactive shell while I normally use interactive mode. The
// issue is probably related to what shells in interactive mode do before they
// show the prompt and not related to the terminal settings.

signature.asc (205 bytes) Download Attachment