]> git.pld-linux.org Git - packages/screen.git/blob - screen-osc.patch
- unify @direntry formatting (description at 41st column)
[packages/screen.git] / screen-osc.patch
1 ; support OSC 10 and 11 commands for xterm default fg/bg colour
2 ; http://www.xfree86.org/current/ctlseqs.html
3 ; P s = 1 0 → Change VT100 text foreground color to P t
4 ; P s = 1 1 → Change VT100 text background color to P t 
5 --- screen-4.1/ansi.c~  2010-02-24 15:33:05.000000000 +0200
6 +++ screen-4.1/ansi.c   2010-02-24 15:42:23.596133932 +0200
7 @@ -1530,12 +1530,14 @@
8         }
9  #endif
10  #ifdef RXVT_OSC
11 -      if (typ == 0 || typ == 1 || typ == 2 || typ == 20 || typ == 39 || typ == 49)
12 +      if (typ == 0 || typ == 1 || typ == 2 || typ == 20 || typ == 39 || typ == 49 || typ == 10 || typ == 11 )
13         {
14           int typ2;
15           typ2 = typ / 10;
16           if (--typ2 < 0)
17             typ2 = 0;
18 +         if (typ == 10) typ2 = 4;
19 +         if (typ == 11) typ2 = 5;
20           if (strcmp(curr->w_xtermosc[typ2], p))
21             {
22               strncpy(curr->w_xtermosc[typ2], p, sizeof(curr->w_xtermosc[typ2]) - 1);
23 @@ -1513,7 +1516,7 @@
24                     continue;
25                   if (D_forecv->c_layer->l_bottom == &curr->w_layer)
26                     SetXtermOSC(typ2, curr->w_xtermosc[typ2]);
27 -                 if ((typ2 == 2 || typ2 == 3) && D_xtermosc[typ2])
28 +                 if ((typ2 == 2 || typ2 == 3 || typ2 == 4 || typ2 == 5) && D_xtermosc[typ2])
29                     Redisplay(0);
30                 }
31             }
32 --- screen-4.0.3/display.c      2003-12-05 14:45:41.000000000 +0100
33 +++ screen-4.0.3.wiget/display.c        2008-03-21 22:21:46.000000000 +0100
34 @@ -3053,7 +3053,7 @@
35  int i;
36  char *s;
37  {
38 -  static char oscs[] = "1;\000\00020;\00039;\00049;\000";
39 +  static char oscs[] = "1;\000\00020;\00039;\00049;\00010;\00011;\000";
40  
41    ASSERT(display);
42    if (!D_CXT)
43 @@ -3066,22 +3066,26 @@
44      s = "screen";              /* always set icon name */
45    if (i == 1 && !*s)
46      s = "";                    /* no background */
47 -  if (i == 2 && !*s)
48 +  if ((i == 2 || i == 4) && !*s)
49      s = "black";               /* black text */
50 -  if (i == 3 && !*s)
51 +  if ((i == 3 || i == 5) && !*s)
52      s = "white";               /* on white background */
53    D_xtermosc[i] = 1;
54    AddStr("\033]");
55    AddStr(oscs + i * 4);
56    AddStr(s);
57 -  AddChar(7);
58 +  if ((i == 4) || (i == 5)) {
59 +    AddStr("\033\\");
60 +  } else {
61 +    AddChar(7);
62 +  }
63  }
64  
65  void
66  ClearAllXtermOSC()
67  {
68    int i;
69 -  for (i = 3; i >= 0; i--)
70 +  for (i = 5; i >= 0; i--)
71      SetXtermOSC(i, 0);
72  }
73  #endif
74 Tylko w screen-4.0.3.wiget: display.c~
75 --- screen-4.0.3/display.h      2003-07-01 16:01:42.000000000 +0200
76 +++ screen-4.0.3.wiget/display.h        2008-03-21 22:08:44.000000000 +0100
77 @@ -113,7 +113,7 @@
78    int  d_lp_missing;           /* last character on bot line missing */
79    int   d_mouse;               /* mouse mode */
80  #ifdef RXVT_OSC
81 -  int   d_xtermosc[4];         /* osc used */
82 +  int   d_xtermosc[6];         /* osc used */
83  #endif
84    struct mchar d_lpchar;       /* missing char */
85    struct timeval d_status_time;        /* time of status display */
This page took 0.03839 seconds and 3 git commands to generate.