Hi Ben,
Thanks for the solution. I tried it out and unfortunately it still gives me a
ton of whitespace. In fact, now the previous prompt disappears (apparently
newlined out of the terminal).
Thanks!
On Tuesday, March 20, 2012 1:32:33 AM UTC-4, Benjamin R. Haskell wrote:
> On Thu, 23 Feb 2012, Doppp wrote:
>
> > I encountered this pretty strange bug when I was trying to fix my Vim
> > cursor color.
> >
> > I am using Terminator and I found out that the cursor colors for my
> > color scheme were not working. I did a Google search and was brought
> > to this site where I used this snippet of code:
> >
> > if &term =~ "xterm\\|rxvt"
> > " use an orange cursor in insert mode
> > let &t_SI = "\<Esc>]12;orange\x7"
> > " use a red cursor otherwise
> > let &t_EI = "\<Esc>]12;red\x7"
> > silent !echo -ne "\033]12;red\007"
> > " reset cursor when vim exits
> > autocmd VimLeave * silent !echo -ne "\033]112\007"
> > " use \003]12;gray\007 for gnome-terminal
> > endif
> >
> > The cursor colors changed and things worked fine. However, I
> > encountered a weird bug after including this code. Say I opened a new
> > terminal, entered Vim and then just quit. My shell prompt will
> > suddenly go to the bottom of the terminal and there would be a huge
> > chunk of whitespace/newlines between the top of the terminal (where
> > the previous prompt was) and the new prompt at the bottom of the
> > terminal. I commented out this line:
> >
> > silent !echo -ne "\033]12;red\007"
>
> Change that line to:
>
> silent !echo -e "\033]12;red\007"
>
> ('-e' instead of '-ne')
>
> Same on this line:
> > autocmd VimLeave * silent !echo -ne "\033]112\007"
>
> to:
>
> autocmd VimLeave * silent !echo -e "\033]112\007"
>
> Terminator seemingly doesn't completely consume the echo'ed escape
> sequence if it doesn't have the trailing newline (-n means "no
> newline").
>
> --
> Best,
> Ben
--
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