Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 561090

Summary: urxvt with transparent background injects garbage into vim
Product: Gentoo Linux Reporter: Barnoid <barnoid>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: minor    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Output of emerge -info

Description Barnoid 2015-09-22 02:40:10 UTC
Created attachment 412502 [details]
Output of emerge -info

An relatively recent update to rxvt-unicode or vim results in the following behavior (observed on all machines using true transparency for urxvt)

Opening vi from a urxvt with true transparency results in garbage injected into vi. The injected string corresponds to the background color setting plus some ansi escape characters.

To reproduce: 
1. set the following values in .Xresources
  $ vi ~/.Xresources
  URxvt*termName: rxvt-256color
  URxvt*depth: 32
  URxvt*background: rgba:0000/0000/0000/c800
  URxvt*foreground: White

2. merge settings & start new urxvt
  $ xrdb ~/.Xresources
  $ urxvt

3. start vi (with/without file argument) in new terminal
  $ vim

4. the vi buffer is in insertion mode and shows

:c800/0000/0000/0000[>85;95;0c
~                                                        
~                                                        
~                                                        
~                                                        
~                                                        
-- INSERT --                           1,31          All


This string corresponds to the background color setting of urxvt plus some ansi escape sequence. Changing this value in .Xresources will inject the modified value into the vi editor window. If alpha is set to >=fff0 (no transparency) then the vi screen shows the regular welcome message. The same behavior is also observed for <[%%]color> background settings; it seems that internally those are converted to rrrr/gggg/bbbb/aaaa, as a corresponding r/g/b/a string gets injected.


The window manager is Xfwm (Xfce). Installed versions of urxvt and vim incl. USE flags:
x11-terms/rxvt-unicode-9.21::gentoo  
  USE="256-color buffer-on-clear fading-colors focused-urgency font-styles mousewheel perl pixbuf startup-notification xft -alt-font-width -blink -iso14755 -secondary-wheel -unicode3 -vanilla -wcwidth
app-editors/vim-7.4.769::gentoo  
  USE="X acl cscope nls python -debug -gpm -lua -luajit -minimal -perl -racket -ruby (-selinux) -tcl -vim-pager" 
  PYTHON_TARGETS="python2_7 python3_4 -python3_3" 

emerge --info attached.
Comment 1 Tim Harder gentoo-dev 2015-09-22 03:40:14 UTC

*** This bug has been marked as a duplicate of bug 559322 ***