Hi,

* Thomas Dickey <[EMAIL PROTECTED]> [2006-01-16 10:18]:
> On Fri, Jan 13, 2006 at 07:30:47PM +0100, Pierre Lombard wrote:
> > After some investigations, it's indeed a line in my .screenrc that messes
> > up the xterm with xterm 208-2.
> > 
> > FWIW the offending line in my screenrc is:
> > 
> > caption always "%{=r kd}%-Lw%{= bd}%50>%n%f* %t%{-}%+Lw%<%{- Wk}"
> 
> thanks (I'll decipher that, to satisfy my curiosity).
>  
> > After exiting screen, 'reset' does not restore the cursor when screen
> > has been launched.  'vim' does.
> 
> Generally speaking, reset uses the rs2 string that's defined in the terminfo.
> A few times (mouse for instance), someone points out for ncurses that it
> would be nice to add features to those.  I'll make a note to investigate
> the cursor setting in the terminfo descriptions.
> 
> vim has built-in tables which it may use instead of the terminfo description.

After some debugging, I think I've found the offending chunks in
charproc.c::SGR_Foreground() function.

The code path in this function has changed between previous (working)
and current (non-working) xterm version.

The attached patch restores the previous working (for me) code path for
SGR_Foreground().

FWIW, similar code has also been changed in a similar way in
SGR_Background() so it might be useful to have a look there.

Regards,
-- 
Pierre Lombard
--- xterm-208/charproc.c        2006-01-04 03:10:19.000000000 +0100
+++ xterm-208-fix/charproc.c    2006-02-14 10:02:42.000000000 +0100
@@ -799,12 +799,11 @@
     fg = getXtermForeground(term->flags, color);
     term->cur_foreground = color;
 
+    XSetForeground(screen->display, NormalGC(screen), fg);
+    XSetBackground(screen->display, ReverseGC(screen), fg);
     if (NormalGC(screen) != NormalBoldGC(screen)) {
        XSetForeground(screen->display, NormalBoldGC(screen), fg);
        XSetBackground(screen->display, ReverseBoldGC(screen), fg);
-    } else {
-       XSetForeground(screen->display, NormalGC(screen), fg);
-       XSetBackground(screen->display, ReverseGC(screen), fg);
     }
 }
 

Reply via email to