ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.212 by root, Wed Dec 21 14:19:19 2005 UTC vs.
Revision 1.223 by root, Sun Jan 1 05:28:28 2006 UTC

54# include "keyboard.h" 54# include "keyboard.h"
55#endif 55#endif
56 56
57#include <csignal> 57#include <csignal>
58 58
59#define HAVE_SCHED_YIELD 1 //D//TODO//FIXME
60#if HAVE_SCHED_YIELD
61# include <sched.h>
62#endif
63
59/*----------------------------------------------------------------------*/ 64/*----------------------------------------------------------------------*/
60 65
61#define IS_CONTROL(ch) !((ch) & 0xffffff60UL) 66#define IS_CONTROL(ch) !((ch) & 0xffffff60UL)
62 67
63// exception thrown when the command parser runs out of input data 68// exception thrown when the command parser runs out of input data
141 || !IN_RANGE_EXC (y, 0, nrow)) 146 || !IN_RANGE_EXC (y, 0, nrow))
142 return; 147 return;
143 148
144 for (;;) 149 for (;;)
145 { 150 {
146 const line_t &l = ROW(-view_start); 151 const line_t &l = ROW(y - view_start);
147 152
148 text_t t = l.t[x]; 153 text_t t = l.t[x];
149 154
150 if (t != NOCHAR || !x) 155 if (t != NOCHAR || !x)
151 { 156 {
152 iso14755_51 (l.t[x], l.r[x]); 157 iso14755_51 (l.t[x], l.r[x], x, y);
153 iso14755buf = ISO_14755_54; 158 iso14755buf = ISO_14755_54;
154 break; 159 break;
155 } 160 }
156 161
157 x--; 162 x--;
158 } 163 }
159} 164}
160#endif
161 165
162#if ENABLE_OVERLAY
163void 166void
164rxvt_term::iso14755_51 (unicode_t ch, rend_t r) 167rxvt_term::iso14755_51 (unicode_t ch, rend_t r, int x, int y)
165{ 168{
166 rxvt_fontset *fs = FONTSET (r); 169 rxvt_fontset *fs = FONTSET (r);
167 rxvt_font *f = (*fs)[fs->find_font (ch)]; 170 rxvt_font *f = (*fs)[fs->find_font (ch)];
168 wchar_t *chr, *alloc, ch2, *fname; 171 wchar_t *chr, *alloc, ch2, *fname;
169 int len; 172 int len;
170 173
171 fname = rxvt_utf8towcs (f->name); 174 fname = rxvt_utf8towcs (f->name);
172 175
173#if ENABLE_COMBINING 176# if ENABLE_COMBINING
174 if (IS_COMPOSE (ch)) 177 if (IS_COMPOSE (ch))
175 { 178 {
176 len = rxvt_composite.expand (ch, 0); 179 len = rxvt_composite.expand (ch, 0);
177 alloc = chr = new wchar_t[len]; 180 alloc = chr = new wchar_t[len];
178 rxvt_composite.expand (ch, chr); 181 rxvt_composite.expand (ch, chr);
179 } 182 }
180 else 183 else
181#endif 184# endif
182 { 185 {
183 ch2 = ch; 186 ch2 = ch;
184 187
185 alloc = 0; 188 alloc = 0;
186 chr = &ch2; 189 chr = &ch2;
187 len = 1; 190 len = 1;
188 } 191 }
189 192
193 char attr[80]; // plenty
194
195 sprintf (attr, "%08x = fg %d bg %d%s%s%s%s%s%s",
196 (int)r,
197 fgcolor_of (r), bgcolor_of (r),
198 r & RS_Bold ? " bold" : "",
199 r & RS_Italic ? " italic" : "",
200 r & RS_Blink ? " blink" : "",
201 r & RS_RVid ? " rvid" : "",
202 r & RS_Uline ? " uline" : "",
203 r & RS_Careful ? " careful" : "");
204
190 int width = wcswidth (fname, wcslen (fname)); 205 int width = wcswidth (fname, wcslen (fname));
191 206
192 scr_overlay_new (0, -1, width < 8+5 ? 8+5 : width, len + 1); 207 max_it (width, 8+5); // for char + hey
208 max_it (width, strlen (attr));
209
210 if (y >= 0)
211 {
212 y = (y >= nrow - len - 4 && x < width + 2) ? 0 : -1;
213 x = 0;
214 }
215
216 scr_overlay_new (x, y, width, len + 2);
193 217
194 r = SET_STYLE (OVERLAY_RSTYLE, GET_STYLE (r)); 218 r = SET_STYLE (OVERLAY_RSTYLE, GET_STYLE (r));
195 219
196 for (int y = 0; y < len; y++) 220 for (int y = 0; y < len; y++)
197 { 221 {
200 ch = *chr++; 224 ch = *chr++;
201 225
202 sprintf (buf, "%8x", ch); 226 sprintf (buf, "%8x", ch);
203 scr_overlay_set (0, y, buf); 227 scr_overlay_set (0, y, buf);
204 scr_overlay_set (9, y, '='); 228 scr_overlay_set (9, y, '=');
205#if !UNICODE3 229# if !UNICODE3
206 if (ch >= 0x10000) 230 if (ch >= 0x10000)
207 ch = 0xfffd; 231 ch = 0xfffd;
208#endif 232# endif
209 scr_overlay_set (11, y, ch, r); 233 scr_overlay_set (11, y, ch, r);
210 scr_overlay_set (12, y, NOCHAR, r); 234 scr_overlay_set (12, y, NOCHAR, r);
211 } 235 }
212 236
237 scr_overlay_set (0, len , attr);
213 scr_overlay_set (0, len, fname); 238 scr_overlay_set (0, len + 1, fname);
214 239
215 free (fname); 240 free (fname);
216 241
217#if ENABLE_COMBINING 242# if ENABLE_COMBINING
218 if (alloc) 243 if (alloc)
219 delete [] alloc; 244 delete [] alloc;
220#endif 245# endif
221} 246}
222#endif 247#endif
223 248
224void 249void
225rxvt_term::commit_iso14755 () 250rxvt_term::commit_iso14755 ()
844 } 869 }
845 870
846 if (len <= 0) 871 if (len <= 0)
847 return; /* not mapped */ 872 return; /* not mapped */
848 873
849 if (options & Opt_scrollTtyKeypress) 874 if (OPTION (Opt_scrollTtyKeypress))
850 if (view_start) 875 if (view_start)
851 { 876 {
852 view_start = 0; 877 view_start = 0;
853 want_refresh = 1; 878 want_refresh = 1;
854 } 879 }
1060 1085
1061 memmove (cmdbuf_base, cmdbuf_ptr, n); 1086 memmove (cmdbuf_base, cmdbuf_ptr, n);
1062 cmdbuf_ptr = cmdbuf_base; 1087 cmdbuf_ptr = cmdbuf_base;
1063 cmdbuf_endp = cmdbuf_ptr + n; 1088 cmdbuf_endp = cmdbuf_ptr + n;
1064 1089
1065 n = read (pty.pty, cmdbuf_endp, CBUFSIZ - n); 1090 ssize_t r = read (pty.pty, cmdbuf_endp, CBUFSIZ - n);
1066 1091
1067 if (n > 0) 1092 if (r > 0)
1068 { 1093 {
1069 cmdbuf_endp += n; 1094 cmdbuf_endp += r;
1070 return true; 1095 return true;
1071 } 1096 }
1072 else if (n < 0 && errno != EAGAIN) 1097 else if (r < 0 && (errno == EAGAIN || errno == EINTR))
1098 {
1099#if HAVE_SCHED_YIELD
1100 sched_yield ();
1101#endif
1102 }
1103 else
1104 {
1105 pty_ev.stop ();
1106
1107 if (!OPTION (Opt_hold))
1073 destroy (); 1108 destroy ();
1109 }
1074 1110
1075 return false; 1111 return false;
1076} 1112}
1077 1113
1078void 1114void
1098 recolour_cursor (); 1134 recolour_cursor ();
1099 1135
1100#ifdef POINTER_BLANK 1136#ifdef POINTER_BLANK
1101 hidden_pointer = 0; 1137 hidden_pointer = 0;
1102 1138
1103 if (options & Opt_pointerBlank) 1139 if (OPTION (Opt_pointerBlank))
1104 pointer_ev.start (NOW + pointerBlankDelay); 1140 pointer_ev.start (NOW + pointerBlankDelay);
1105#endif 1141#endif
1106} 1142}
1107 1143
1108#ifdef POINTER_BLANK 1144#ifdef POINTER_BLANK
1109void 1145void
1110rxvt_term::pointer_blank () 1146rxvt_term::pointer_blank ()
1111{ 1147{
1112 if (! (options & Opt_pointerBlank)) 1148 if (! OPTION (Opt_pointerBlank))
1113 return; 1149 return;
1114 1150
1115 XDefineCursor (display->display, vt, display->blank_cursor); 1151 XDefineCursor (display->display, vt, display->blank_cursor);
1116 XFlush (display->display); 1152 XFlush (display->display);
1117 1153
1215 1251
1216 SET_R (this); 1252 SET_R (this);
1217 SET_LOCALE (locale); 1253 SET_LOCALE (locale);
1218 1254
1219#if defined(CURSOR_BLINK) 1255#if defined(CURSOR_BLINK)
1220 if ((options & Opt_cursorBlink) && ev.type == KeyPress) 1256 if (OPTION (Opt_cursorBlink) && ev.type == KeyPress)
1221 { 1257 {
1222 if (hidden_cursor) 1258 if (hidden_cursor)
1223 { 1259 {
1224 hidden_cursor = 0; 1260 hidden_cursor = 0;
1225 want_refresh = 1; 1261 want_refresh = 1;
1228 cursor_blink_ev.start (NOW + BLINK_INTERVAL); 1264 cursor_blink_ev.start (NOW + BLINK_INTERVAL);
1229 } 1265 }
1230#endif 1266#endif
1231 1267
1232#if defined(POINTER_BLANK) 1268#if defined(POINTER_BLANK)
1233 if ((options & Opt_pointerBlank) && pointerBlankDelay > 0) 1269 if (OPTION (Opt_pointerBlank) && pointerBlankDelay > 0)
1234 { 1270 {
1235 if (ev.type == MotionNotify 1271 if (ev.type == MotionNotify
1236 || ev.type == ButtonPress 1272 || ev.type == ButtonPress
1237 || ev.type == ButtonRelease) 1273 || ev.type == ButtonRelease)
1238 if (hidden_pointer) 1274 if (hidden_pointer)
1434 seen_resize = 1; 1470 seen_resize = 1;
1435 resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); 1471 resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1);
1436 } 1472 }
1437 1473
1438#ifdef TRANSPARENT /* XXX: maybe not needed - leave in for now */ 1474#ifdef TRANSPARENT /* XXX: maybe not needed - leave in for now */
1439 if (options & Opt_transparent) 1475 if (OPTION (Opt_transparent))
1440 check_our_parents (); 1476 check_our_parents ();
1441#endif 1477#endif
1442 } 1478 }
1443 break; 1479 break;
1444 1480
1653 IMSetStatusPosition (); 1689 IMSetStatusPosition ();
1654 XSetICFocus (Input_Context); 1690 XSetICFocus (Input_Context);
1655 } 1691 }
1656#endif 1692#endif
1657#if CURSOR_BLINK 1693#if CURSOR_BLINK
1658 if (options & Opt_cursorBlink) 1694 if (OPTION (Opt_cursorBlink))
1659 cursor_blink_ev.start (NOW + BLINK_INTERVAL); 1695 cursor_blink_ev.start (NOW + BLINK_INTERVAL);
1660#endif 1696#endif
1661#if OFF_FOCUS_FADING 1697#if OFF_FOCUS_FADING
1662 if (rs[Rs_fade]) 1698 if (rs[Rs_fade])
1663 { 1699 {
1685#if USE_XIM 1721#if USE_XIM
1686 if (Input_Context != NULL) 1722 if (Input_Context != NULL)
1687 XUnsetICFocus (Input_Context); 1723 XUnsetICFocus (Input_Context);
1688#endif 1724#endif
1689#if CURSOR_BLINK 1725#if CURSOR_BLINK
1690 if (options & Opt_cursorBlink) 1726 if (OPTION (Opt_cursorBlink))
1691 cursor_blink_ev.stop (); 1727 cursor_blink_ev.stop ();
1692 hidden_cursor = 0; 1728 hidden_cursor = 0;
1693#endif 1729#endif
1694#if OFF_FOCUS_FADING 1730#if OFF_FOCUS_FADING
1695 if (rs[Rs_fade]) 1731 if (rs[Rs_fade])
1719 && ev.xproperty.atom != xa[XA_ESETROOT_PMAP_ID]) 1755 && ev.xproperty.atom != xa[XA_ESETROOT_PMAP_ID])
1720 return; 1756 return;
1721 1757
1722 /* FALLTHROUGH */ 1758 /* FALLTHROUGH */
1723 case ReparentNotify: 1759 case ReparentNotify:
1724 if ((options & Opt_transparent) && check_our_parents () && am_transparent) 1760 if (OPTION (Opt_transparent) && check_our_parents () && am_transparent)
1725 want_refresh = want_full_refresh = 1; 1761 want_refresh = want_full_refresh = 1;
1726 break; 1762 break;
1727 } 1763 }
1728} 1764}
1729#endif 1765#endif
2071 2107
2072 v = ev.button == Button4 ? UP : DN; 2108 v = ev.button == Button4 ? UP : DN;
2073 2109
2074 if (ev.state & ShiftMask) 2110 if (ev.state & ShiftMask)
2075 i = 1; 2111 i = 1;
2076 else if (options & Opt_mouseWheelScrollPage) 2112 else if (OPTION (Opt_mouseWheelScrollPage))
2077 i = nrow - 1; 2113 i = nrow - 1;
2078 else 2114 else
2079 i = 5; 2115 i = 5;
2080 2116
2081# ifdef MOUSE_SLIP_WHEELING 2117# ifdef MOUSE_SLIP_WHEELING
2367 XWindowAttributes wattr, wrootattr; 2403 XWindowAttributes wattr, wrootattr;
2368 dDisp; 2404 dDisp;
2369 2405
2370 pchanged = 0; 2406 pchanged = 0;
2371 2407
2372 if (!(options & Opt_transparent)) 2408 if (!OPTION (Opt_transparent))
2373 return pchanged; /* Don't try any more */ 2409 return pchanged; /* Don't try any more */
2374 2410
2375 XGetWindowAttributes (disp, display->root, &wrootattr); 2411 XGetWindowAttributes (disp, display->root, &wrootattr);
2376 rootdepth = wrootattr.depth; 2412 rootdepth = wrootattr.depth;
2377 2413
2655 if (ch == C0_LF) 2691 if (ch == C0_LF)
2656 nlines++; 2692 nlines++;
2657 2693
2658 refresh_count++; 2694 refresh_count++;
2659 2695
2660 if (!(options & Opt_jumpScroll) 2696 if (!OPTION (Opt_jumpScroll)
2661 || (refresh_count >= refresh_limit * (nrow - 1))) 2697 || (refresh_count >= refresh_limit * (nrow - 1)))
2662 { 2698 {
2663 refreshnow = true; 2699 refreshnow = true;
2664 ch = NOCHAR; 2700 ch = NOCHAR;
2665 break; 2701 break;
2699 * the number of pages between refreshes is refresh_limit, which 2735 * the number of pages between refreshes is refresh_limit, which
2700 * is incremented here because we must be doing flat-out scrolling. 2736 * is incremented here because we must be doing flat-out scrolling.
2701 */ 2737 */
2702 if (refreshnow) 2738 if (refreshnow)
2703 { 2739 {
2704 if ((options & Opt_jumpScroll) && refresh_limit < REFRESH_PERIOD) 2740 if (OPTION (Opt_jumpScroll) && refresh_limit < REFRESH_PERIOD)
2705 refresh_limit++; 2741 refresh_limit++;
2706 else 2742 else
2707 { 2743 {
2708 flag = true; 2744 flag = true;
2709 scr_refresh (refresh_type); 2745 scr_refresh (refresh_type);
3373 break; 3409 break;
3374 case 6: /* CPR requested */ 3410 case 6: /* CPR requested */
3375 scr_report_position (); 3411 scr_report_position ();
3376 break; 3412 break;
3377 case 7: /* unofficial extension */ 3413 case 7: /* unofficial extension */
3378 if (options & Opt_insecure) 3414 if (OPTION (Opt_insecure))
3379 tt_printf ("%-.250s\012", rs[Rs_display_name]); 3415 tt_printf ("%-.250s\012", rs[Rs_display_name]);
3380 break; 3416 break;
3381 case 8: /* unofficial extension */ 3417 case 8: /* unofficial extension */
3382 process_xterm_seq (XTerm_title, RESNAME "-" VERSION, CHAR_ST); 3418 process_xterm_seq (XTerm_title, RESNAME "-" VERSION, CHAR_ST);
3383 break; 3419 break;
3547 break; 3583 break;
3548 case 20: /* report icon label */ 3584 case 20: /* report icon label */
3549 { 3585 {
3550 char *s; 3586 char *s;
3551 XGetIconName (disp, parent[0], &s); 3587 XGetIconName (disp, parent[0], &s);
3552 tt_printf ("\033]L%-.250s\234", (options & Opt_insecure) && s ? s : ""); /* 8bit ST */ 3588 tt_printf ("\033]L%-.250s\234", OPTION (Opt_insecure) && s ? s : ""); /* 8bit ST */
3553 XFree (s); 3589 XFree (s);
3554 } 3590 }
3555 break; 3591 break;
3556 case 21: /* report window title */ 3592 case 21: /* report window title */
3557 { 3593 {
3558 char *s; 3594 char *s;
3559 XFetchName (disp, parent[0], &s); 3595 XFetchName (disp, parent[0], &s);
3560 tt_printf ("\033]l%-.250s\234", (options & Opt_insecure) && s ? s : ""); /* 8bit ST */ 3596 tt_printf ("\033]l%-.250s\234", OPTION (Opt_insecure) && s ? s : ""); /* 8bit ST */
3561 XFree (s); 3597 XFree (s);
3562 } 3598 }
3563 break; 3599 break;
3564 } 3600 }
3565} 3601}
3841 // TODO, when secure mode? 3877 // TODO, when secure mode?
3842 break; 3878 break;
3843 3879
3844#ifdef MENUBAR 3880#ifdef MENUBAR
3845 case URxvt_Menu: 3881 case URxvt_Menu:
3846 if (options & Opt_insecure) 3882 if (OPTION (Opt_insecure))
3847 menubar_dispatch (const_cast<char *>(str)); // casting away constness is checked 3883 menubar_dispatch (const_cast<char *>(str)); // casting away constness is checked
3848 break; 3884 break;
3849#endif 3885#endif
3850#if 0 3886#if 0
3851 case XTerm_dumpscreen: /* no error notices */ 3887 case XTerm_dumpscreen: /* no error notices */
3867 case URxvt_italicFont: 3903 case URxvt_italicFont:
3868 case URxvt_boldItalicFont: 3904 case URxvt_boldItalicFont:
3869#endif 3905#endif
3870 if (query) 3906 if (query)
3871 tt_printf ("\33]%d;%-.250s%c", saveop, 3907 tt_printf ("\33]%d;%-.250s%c", saveop,
3872 (options & Opt_insecure) && fontset[op - URxvt_font]->fontdesc 3908 OPTION (Opt_insecure) && fontset[op - URxvt_font]->fontdesc
3873 ? fontset[op - URxvt_font]->fontdesc : "", 3909 ? fontset[op - URxvt_font]->fontdesc : "",
3874 resp); 3910 resp);
3875 else 3911 else
3876 { 3912 {
3877 const char *&res = rs[Rs_font + (op - URxvt_font)]; 3913 const char *&res = rs[Rs_font + (op - URxvt_font)];
3883 break; 3919 break;
3884 3920
3885#if ENABLE_FRILLS 3921#if ENABLE_FRILLS
3886 case URxvt_locale: 3922 case URxvt_locale:
3887 if (query) 3923 if (query)
3888 tt_printf ("\33]%d;%-.250s%c", URxvt_locale, (options & Opt_insecure) ? locale : "", resp); 3924 tt_printf ("\33]%d;%-.250s%c", URxvt_locale, OPTION (Opt_insecure) ? locale : "", resp);
3889 else 3925 else
3890 { 3926 {
3891 set_locale (str); 3927 set_locale (str);
3892 pty.set_utf8_mode (enc_utf8); 3928 pty.set_utf8_mode (enc_utf8);
3893 init_xlocale (); 3929 init_xlocale ();
4021 } 4057 }
4022 4058
4023 /* extra handling for values with state unkept */ 4059 /* extra handling for values with state unkept */
4024 switch (arg[i]) 4060 switch (arg[i])
4025 { 4061 {
4062#if ENABLE_STYLES
4063 case 1021:
4064 if (mode)
4065 SET_OPTION (Opt_intensityStyles);
4066 else
4067 CLR_OPTION (Opt_intensityStyles);
4068
4069 want_refresh = 1;
4070 want_full_refresh = 1;
4071 break;
4072#endif
4026 case 1048: /* alternative cursor save */ 4073 case 1048: /* alternative cursor save */
4027 case 1049: 4074 case 1049:
4028 if (options & Opt_secondaryScreen) 4075 if (OPTION (Opt_secondaryScreen))
4029 if (mode == 0) 4076 if (mode == 0)
4030 scr_cursor (RESTORE); 4077 scr_cursor (RESTORE);
4031 else if (mode == 1) 4078 else if (mode == 1)
4032 scr_cursor (SAVE); 4079 scr_cursor (SAVE);
4033 break; 4080 break;
4048 case 3: /* 80/132 */ 4095 case 3: /* 80/132 */
4049 if (priv_modes & PrivMode_132OK) 4096 if (priv_modes & PrivMode_132OK)
4050 set_widthheight (((state ? 132 : 80) * fwidth), height); 4097 set_widthheight (((state ? 132 : 80) * fwidth), height);
4051 break; 4098 break;
4052 case 4: /* smooth scrolling */ 4099 case 4: /* smooth scrolling */
4053 if (state) 4100 if (!state)
4054 options &= ~Opt_jumpScroll; 4101 SET_OPTION (Opt_jumpScroll);
4055 else 4102 else
4056 options |= Opt_jumpScroll; 4103 CLR_OPTION (Opt_jumpScroll);
4057 break; 4104 break;
4058 case 5: /* reverse video */ 4105 case 5: /* reverse video */
4059 scr_rvideo_mode (state); 4106 scr_rvideo_mode (state);
4060 break; 4107 break;
4061 case 6: /* relative/absolute origins */ 4108 case 6: /* relative/absolute origins */
4102#if 0 4149#if 0
4103 case 1001: 4150 case 1001:
4104 break; /* X11 mouse highlighting */ 4151 break; /* X11 mouse highlighting */
4105#endif 4152#endif
4106 case 1010: /* scroll to bottom on TTY output inhibit */ 4153 case 1010: /* scroll to bottom on TTY output inhibit */
4107 if (state) 4154 if (!state)
4108 options &= ~Opt_scrollTtyOutput; 4155 SET_OPTION (Opt_scrollTtyOutput);
4109 else 4156 else
4110 options |= Opt_scrollTtyOutput; 4157 CLR_OPTION (Opt_scrollTtyOutput);
4111 break; 4158 break;
4112 case 1011: /* scroll to bottom on key press */ 4159 case 1011: /* scroll to bottom on key press */
4113 if (state) 4160 if (state)
4114 options |= Opt_scrollTtyKeypress; 4161 SET_OPTION (Opt_scrollTtyKeypress);
4115 else 4162 else
4116 options &= ~Opt_scrollTtyKeypress; 4163 CLR_OPTION (Opt_scrollTtyKeypress);
4117 break; 4164 break;
4118 case 1047: /* secondary screen w/ clearing last */ 4165 case 1047: /* secondary screen w/ clearing last */
4119 if (options & Opt_secondaryScreen) 4166 if (OPTION (Opt_secondaryScreen))
4120 if (current_screen != PRIMARY) 4167 if (current_screen != PRIMARY)
4121 scr_erase_screen (2); 4168 scr_erase_screen (2);
4122 scr_change_screen (state); 4169 scr_change_screen (state);
4123 break; 4170 break;
4124 case 1049: /* secondary screen w/ clearing first */ 4171 case 1049: /* secondary screen w/ clearing first */
4125 scr_change_screen (state); 4172 scr_change_screen (state);
4126 if (options & Opt_secondaryScreen) 4173 if (OPTION (Opt_secondaryScreen))
4127 if (current_screen != PRIMARY) 4174 if (current_screen != PRIMARY)
4128 scr_erase_screen (2); 4175 scr_erase_screen (2);
4129 break; 4176 break;
4130 default: 4177 default:
4131 break; 4178 break;
4281 case 106: 4328 case 106:
4282 case 107: 4329 case 107:
4283 scr_color ((unsigned int) (minBrightCOLOR + (arg[i] - 100)), Color_bg); 4330 scr_color ((unsigned int) (minBrightCOLOR + (arg[i] - 100)), Color_bg);
4284 break; 4331 break;
4285#endif 4332#endif
4286
4287 } 4333 }
4288 } 4334 }
4289} 4335}
4290/*}}} */ 4336/*}}} */
4291 4337
4372 } 4418 }
4373 4419
4374 memmove (v_buffer, v_buffer + written, v_buflen); 4420 memmove (v_buffer, v_buffer + written, v_buflen);
4375 } 4421 }
4376 else if (written != -1 || (errno != EAGAIN && errno != EINTR)) 4422 else if (written != -1 || (errno != EAGAIN && errno != EINTR))
4377 // original code just ignores this... 4423 pty_ev.set (EVENT_READ);
4378 destroy ();
4379} 4424}
4380 4425
4381/*----------------------- end-of-file (C source) -----------------------*/ 4426/*----------------------- end-of-file (C source) -----------------------*/
4382 4427

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines