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.244 by root, Fri Jan 6 17:09:27 2006 UTC vs.
Revision 1.254 by root, Wed Jan 11 02:13:56 2006 UTC

867#endif 867#endif
868 /* nil */ ; 868 /* nil */ ;
869 } 869 }
870 } 870 }
871 871
872 if (HOOK_INVOKE ((this, HOOK_KEY_PRESS, DT_XEVENT, &ev, DT_STRING_LEN, kbuf, len, DT_END))) 872 if (HOOK_INVOKE ((this, HOOK_KEY_PRESS, DT_XEVENT, &ev, DT_INT, keysym, DT_STR_LEN, kbuf, len, DT_END)))
873 return; 873 return;
874 874
875 if (len <= 0) 875 if (len <= 0)
876 return; /* not mapped */ 876 return; /* not mapped */
877 877
973 if (want_refresh) 973 if (want_refresh)
974 { 974 {
975 if (SHOULD_INVOKE (HOOK_LINE_UPDATE)) 975 if (SHOULD_INVOKE (HOOK_LINE_UPDATE))
976 { 976 {
977 int row = -view_start; 977 int row = -view_start;
978 int end_row = row + nrow;
978 979
979 while (row > -nsaved && ROW (row - 1).is_longer ()) 980 while (row > -nsaved && ROW (row - 1).is_longer ())
980 --row; 981 --row;
981 982
982 while (row < -view_start + nrow) 983 do
983 { 984 {
984 int start_row = row; 985 int start_row = row;
985 line_t *l; 986 line_t *l;
986 987
987 do 988 do
988 { 989 {
989 l = &ROW (row); 990 l = &ROW (row);
990 991
991 if (!(l->f & LINE_FILTERED)) 992 if (l->f & LINE_FILTERED)
993 row++;
994 else
992 { 995 {
993 // line not filtered, mark it as filtered 996 // line not filtered, mark it as filtered
994 l->f |= LINE_FILTERED; 997 l->f |= LINE_FILTERED;
995 while (l->is_longer ()) 998 while (l->is_longer ())
996 { 999 {
1002 HOOK_INVOKE ((this, HOOK_LINE_UPDATE, DT_INT, start_row, DT_END)); 1005 HOOK_INVOKE ((this, HOOK_LINE_UPDATE, DT_INT, start_row, DT_END));
1003 1006
1004 break; 1007 break;
1005 } 1008 }
1006 } 1009 }
1007 while (l->is_longer ()); 1010 while (l->is_longer () && row < end_row);
1008
1009 row++;
1010 } 1011 }
1011 1012 while (++row < end_row);
1012 } 1013 }
1013 1014
1014 scr_refresh (refresh_type); 1015 scr_refresh (refresh_type);
1015 scrollbar_show (1); 1016 scrollbar_show (1);
1016#ifdef USE_XIM 1017#ifdef USE_XIM
1312 dDisp; 1313 dDisp;
1313 1314
1314 SET_R (this); 1315 SET_R (this);
1315 SET_LOCALE (locale); 1316 SET_LOCALE (locale);
1316 1317
1317#if defined(CURSOR_BLINK)
1318 if (OPTION (Opt_cursorBlink) && ev.type == KeyPress)
1319 {
1320 if (hidden_cursor)
1321 {
1322 hidden_cursor = 0;
1323 want_refresh = 1;
1324 }
1325
1326 cursor_blink_ev.start (NOW + BLINK_INTERVAL);
1327 }
1328#endif
1329
1330#if defined(POINTER_BLANK)
1331 if (OPTION (Opt_pointerBlank) && pointerBlankDelay > 0)
1332 {
1333 if (ev.type == MotionNotify
1334 || ev.type == ButtonPress
1335 || ev.type == ButtonRelease)
1336 if (hidden_pointer)
1337 pointer_unblank ();
1338
1339 if (ev.type == KeyPress && hidden_pointer == 0)
1340 pointer_blank ();
1341 }
1342#endif
1343
1344 Window unused_root, unused_child; 1318 Window unused_root, unused_child;
1345 int unused_root_x, unused_root_y; 1319 int unused_root_x, unused_root_y;
1346 unsigned int unused_mask; 1320 unsigned int unused_mask;
1347 1321
1348 switch (ev.type) 1322 switch (ev.type)
1355 1329
1356 break; 1330 break;
1357 1331
1358 case KeyRelease: 1332 case KeyRelease:
1359 { 1333 {
1360#if (MOUSE_WHEEL && MOUSE_SLIP_WHEELING) || ISO_14755 1334#if (MOUSE_WHEEL && MOUSE_SLIP_WHEELING) || ISO_14755 || ENABLE_PERL
1361 KeySym ks; 1335 KeySym keysym;
1362 1336
1363 ks = XLookupKeysym (&ev.xkey, ev.xkey.state & ShiftMask ? 1 : 0); // sorry, only shift supported :/ 1337 keysym = XLookupKeysym (&ev.xkey, ev.xkey.state & ShiftMask ? 1 : 0); // sorry, only shift supported :/
1364#endif 1338#endif
1365 1339
1366#if ENABLE_FRILLS || ISO_14755 1340#if ENABLE_FRILLS || ISO_14755
1367 // ISO 14755 support 1341 // ISO 14755 support
1368 if (iso14755buf) 1342 if (iso14755buf)
1373# endif 1347# endif
1374# if ISO_14755 1348# if ISO_14755
1375 // iso14755 part 5.2 handling: release time 1349 // iso14755 part 5.2 handling: release time
1376 // first: controls 1350 // first: controls
1377 if ((ev.xkey.state & ControlMask) 1351 if ((ev.xkey.state & ControlMask)
1378 && ((ks >= 0x40 && ks <= 0x5f) 1352 && ((keysym >= 0x40 && keysym <= 0x5f)
1379 || (ks >= 0x61 && ks <= 0x7f))) 1353 || (keysym >= 0x61 && keysym <= 0x7f)))
1380 { 1354 {
1381 iso14755buf = ISO_14755_51 | 0x2400 | (ks & 0x1f); 1355 iso14755buf = ISO_14755_51 | 0x2400 | (keysym & 0x1f);
1382 commit_iso14755 (); 1356 commit_iso14755 ();
1383 return; // case-break; 1357 goto skip_switch;
1384 } 1358 }
1385 1359
1386 for (unsigned short *i = iso14755_symtab; i[0]; i+= 2) 1360 for (unsigned short *i = iso14755_symtab; i[0]; i+= 2)
1387 if (i[0] == ks) 1361 if (i[0] == keysym)
1388 { 1362 {
1389 iso14755buf = ISO_14755_51 | i[1]; 1363 iso14755buf = ISO_14755_51 | i[1];
1390 commit_iso14755 (); 1364 commit_iso14755 ();
1391 return; // case-break; 1365 goto skip_switch;
1392 } 1366 }
1393 1367
1394 scr_bell (); 1368 scr_bell ();
1395# endif 1369# endif
1396 iso14755buf = 0; 1370 iso14755buf = 0;
1416 iso14755buf = 0; 1390 iso14755buf = 0;
1417 } 1391 }
1418#endif 1392#endif
1419 1393
1420 if (ev.xany.window == vt 1394 if (ev.xany.window == vt
1421 && HOOK_INVOKE ((this, HOOK_KEY_RELEASE, DT_XEVENT, &ev, DT_END))) 1395 && HOOK_INVOKE ((this, HOOK_KEY_RELEASE, DT_XEVENT, &ev, DT_INT, keysym, DT_END)))
1422 break; 1396 break;
1423 1397
1424#if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) 1398#if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING)
1425 if (!(ev.xkey.state & ControlMask)) 1399 if (!(ev.xkey.state & ControlMask))
1426 slip_wheel_ev.stop (); 1400 slip_wheel_ev.stop ();
1427 else if (ks == XK_Control_L || ks == XK_Control_R) 1401 else if (keysym == XK_Control_L || keysym == XK_Control_R)
1428 mouse_slip_wheel_speed = 0; 1402 mouse_slip_wheel_speed = 0;
1429#endif 1403#endif
1430 break; 1404 break;
1431 } 1405 }
1432 1406
1562 1536
1563 case SelectionRequest: 1537 case SelectionRequest:
1564 selection_send (ev.xselectionrequest); 1538 selection_send (ev.xselectionrequest);
1565 break; 1539 break;
1566 1540
1541 case MapNotify:
1542 mapped = 1;
1543#ifdef TEXT_BLINK
1544 text_blink_ev.start (NOW + TEXT_BLINK_INTERVAL);
1545#endif
1546 HOOK_INVOKE ((this, HOOK_MAP_NOTIFY, DT_XEVENT, &ev, DT_END));
1547 break;
1548
1567 case UnmapNotify: 1549 case UnmapNotify:
1568 mapped = 0; 1550 mapped = 0;
1569#ifdef TEXT_BLINK 1551#ifdef TEXT_BLINK
1570 text_blink_ev.stop (); 1552 text_blink_ev.stop ();
1571#endif 1553#endif
1572 break; 1554 HOOK_INVOKE ((this, HOOK_UNMAP_NOTIFY, DT_XEVENT, &ev, DT_END));
1573
1574 case MapNotify:
1575 mapped = 1;
1576#ifdef TEXT_BLINK
1577 text_blink_ev.start (NOW + TEXT_BLINK_INTERVAL);
1578#endif
1579 break; 1555 break;
1580 1556
1581#ifdef TRANSPARENT 1557#ifdef TRANSPARENT
1582 case ReparentNotify: 1558 case ReparentNotify:
1583 rootwin_cb (ev); 1559 rootwin_cb (ev);
1597 1573
1598 while (XCheckTypedWindowEvent (disp, vt, ev.xany.type, &ev)) 1574 while (XCheckTypedWindowEvent (disp, vt, ev.xany.type, &ev))
1599 scr_expose (ev.xexpose.x, ev.xexpose.y, 1575 scr_expose (ev.xexpose.x, ev.xexpose.y,
1600 ev.xexpose.width, ev.xexpose.height, False); 1576 ev.xexpose.width, ev.xexpose.height, False);
1601 1577
1602 scr_refresh (refresh_type); 1578 want_refresh = 1;
1603 } 1579 }
1604 else 1580 else
1605 { 1581 {
1606 XEvent unused_event; 1582 XEvent unused_event;
1607 1583
1734 &unused_root_x, &unused_root_y, 1710 &unused_root_x, &unused_root_y,
1735 &ev.xbutton.x, &ev.xbutton.y, 1711 &ev.xbutton.x, &ev.xbutton.y,
1736 &unused_mask); 1712 &unused_mask);
1737 scr_move_to (scrollbar_position (ev.xbutton.y) - csrO, 1713 scr_move_to (scrollbar_position (ev.xbutton.y) - csrO,
1738 scrollbar_size ()); 1714 scrollbar_size ());
1739 scr_refresh (refresh_type); 1715 want_refresh = 1;
1740 refresh_limit = 0; 1716 refresh_limit = 0;
1741 scrollbar_show (1); 1717 scrollbar_show (1);
1742 } 1718 }
1743 break; 1719 break;
1744 } 1720 }
1721
1722skip_switch: ;
1723
1724#if defined(CURSOR_BLINK)
1725 if (OPTION (Opt_cursorBlink) && ev.type == KeyPress)
1726 {
1727 if (hidden_cursor)
1728 {
1729 hidden_cursor = 0;
1730 want_refresh = 1;
1731 }
1732
1733 cursor_blink_ev.start (NOW + BLINK_INTERVAL);
1734 }
1735#endif
1736
1737#if defined(POINTER_BLANK)
1738 if (OPTION (Opt_pointerBlank) && pointerBlankDelay > 0)
1739 {
1740 if (ev.type == MotionNotify
1741 || ev.type == ButtonPress
1742 || ev.type == ButtonRelease)
1743 if (hidden_pointer)
1744 pointer_unblank ();
1745
1746 if (ev.type == KeyPress && hidden_pointer == 0)
1747 pointer_blank ();
1748 }
1749#endif
1745} 1750}
1746 1751
1747void 1752void
1748rxvt_term::focus_in () 1753rxvt_term::focus_in ()
1749{ 1754{
2211 slip_wheel_ev.start (); 2216 slip_wheel_ev.start ();
2212 } 2217 }
2213 else 2218 else
2214 { 2219 {
2215# endif 2220# endif
2216# ifdef JUMP_MOUSE_WHEEL
2217 scr_page (v, i); 2221 scr_page (v, i);
2218 scr_refresh (SMOOTH_REFRESH);
2219 scrollbar_show (1); 2222 scrollbar_show (1);
2220# else
2221 while (i--)
2222 {
2223 scr_page (v, 1);
2224 scr_refresh (SMOOTH_REFRESH);
2225 scrollbar_show (1);
2226 }
2227# endif
2228# ifdef MOUSE_SLIP_WHEELING 2223# ifdef MOUSE_SLIP_WHEELING
2229 } 2224 }
2230#endif 2225# endif
2231 } 2226 }
2232 break; 2227 break;
2233#endif 2228#endif
2234 } 2229 }
2235 } 2230 }
2724 2719
2725bool 2720bool
2726rxvt_term::cmd_parse () 2721rxvt_term::cmd_parse ()
2727{ 2722{
2728 bool flag = false; 2723 bool flag = false;
2729 unicode_t ch = NOCHAR; 2724 wchar_t ch = NOCHAR;
2730 char *seq_begin; // remember start of esc-sequence here 2725 char *seq_begin; // remember start of esc-sequence here
2731 2726
2732 for (;;) 2727 for (;;)
2733 { 2728 {
2734 if (ch == NOCHAR) 2729 if (ch == NOCHAR)
2755 if (seen_resize && cmd_pid) 2750 if (seen_resize && cmd_pid)
2756 kill (-cmd_pid, SIGWINCH); 2751 kill (-cmd_pid, SIGWINCH);
2757 } 2752 }
2758 2753
2759 /* Read a text string from the input buffer */ 2754 /* Read a text string from the input buffer */
2760 unicode_t buf[UBUFSIZ]; 2755 wchar_t buf[UBUFSIZ];
2761 bool refreshnow = false; 2756 bool refreshnow = false;
2762 int nlines = 0; 2757 int nlines = 0;
2763 unicode_t *str = buf; 2758 wchar_t *str = buf;
2764 unicode_t *eol = str + min (ncol, UBUFSIZ); 2759 wchar_t *eol = str + min (ncol, UBUFSIZ);
2765 2760
2766 for (;;) 2761 for (;;)
2767 { 2762 {
2768 if (ch == NOCHAR || (IS_CONTROL (ch) && ch != C0_LF && ch != C0_CR && ch != C0_HT)) 2763 if (ch == NOCHAR || (IS_CONTROL (ch) && ch != C0_LF && ch != C0_CR && ch != C0_HT))
2769 break; 2764 break;
2787 } 2782 }
2788 2783
2789 // scr_add_lines only works for nlines <= nrow - 1. 2784 // scr_add_lines only works for nlines <= nrow - 1.
2790 if (nlines >= nrow - 1) 2785 if (nlines >= nrow - 1)
2791 { 2786 {
2792 if (!HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_USTRING_LEN, buf, str - buf, DT_END))) 2787 if (!HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END)))
2793 scr_add_lines (buf, nlines, str - buf); 2788 scr_add_lines (buf, str - buf, nlines);
2794 2789
2795 nlines = 0; 2790 nlines = 0;
2796 str = buf; 2791 str = buf;
2797 eol = str + min (ncol, UBUFSIZ); 2792 eol = str + min (ncol, UBUFSIZ);
2798 } 2793 }
2812 2807
2813 seq_begin = cmdbuf_ptr; 2808 seq_begin = cmdbuf_ptr;
2814 ch = next_char (); 2809 ch = next_char ();
2815 } 2810 }
2816 2811
2817 if (!HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_USTRING_LEN, buf, str - buf, DT_END))) 2812 if (!HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END)))
2818 scr_add_lines (buf, nlines, str - buf); 2813 scr_add_lines (buf, str - buf, nlines);
2819 2814
2820 /* 2815 /*
2821 * If there have been a lot of new lines, then update the screen 2816 * If there have been a lot of new lines, then update the screen
2822 * What the heck I'll cheat and only refresh less than every page-full. 2817 * What the heck I'll cheat and only refresh less than every page-full.
2823 * the number of pages between refreshes is refresh_limit, which 2818 * the number of pages between refreshes is refresh_limit, which
2829 refresh_limit++; 2824 refresh_limit++;
2830 else 2825 else
2831 { 2826 {
2832 flag = true; 2827 flag = true;
2833 scr_refresh (refresh_type); 2828 scr_refresh (refresh_type);
2834 flush_ev.stop (); 2829 want_refresh = 1;
2835 } 2830 }
2836 } 2831 }
2837 2832
2838 } 2833 }
2839 else 2834 else
2854 } 2849 }
2855 2850
2856 return flag; 2851 return flag;
2857} 2852}
2858 2853
2859// read the next octet
2860unicode_t
2861rxvt_term::next_octet ()
2862{
2863 return cmdbuf_ptr < cmdbuf_endp
2864 ? *cmdbuf_ptr++
2865 : NOCHAR;
2866}
2867
2868// read the next character 2854// read the next character
2869unicode_t 2855wchar_t
2870rxvt_term::next_char () 2856rxvt_term::next_char ()
2871{ 2857{
2872 while (cmdbuf_ptr < cmdbuf_endp) 2858 while (cmdbuf_ptr < cmdbuf_endp)
2873 { 2859 {
2874 // assume 7-bit to be ascii ALWAYS 2860 // assume 7-bit to be ascii ALWAYS
2884 cmdbuf_ptr = cmdbuf_endp; 2870 cmdbuf_ptr = cmdbuf_endp;
2885 break; 2871 break;
2886 } 2872 }
2887 2873
2888 if (len == (size_t)-1) 2874 if (len == (size_t)-1)
2889 return *cmdbuf_ptr++; // the _occasional_ latin1 character is allowed to slip through 2875 return (unsigned char)*cmdbuf_ptr++; // the _occasional_ latin1 character is allowed to slip through
2890 2876
2891 // assume wchar == unicode 2877 // assume wchar == unicode
2892 cmdbuf_ptr += len; 2878 cmdbuf_ptr += len;
2893 return wc & UNICODE_MASK; 2879 return wc & UNICODE_MASK;
2894 } 2880 }
2895 2881
2896 return NOCHAR; 2882 return NOCHAR;
2883}
2884
2885// read the next octet
2886uint32_t
2887rxvt_term::next_octet ()
2888{
2889 return cmdbuf_ptr < cmdbuf_endp
2890 ? (unsigned char)*cmdbuf_ptr++
2891 : NOCHAR;
2897} 2892}
2898 2893
2899/* rxvt_cmd_getc () - Return next input character */ 2894/* rxvt_cmd_getc () - Return next input character */
2900/* 2895/*
2901 * Return the next input character after first passing any keyboard input 2896 * Return the next input character after first passing any keyboard input
2902 * to the command. 2897 * to the command.
2903 */ 2898 */
2904unicode_t 2899wchar_t
2905rxvt_term::cmd_getc () 2900rxvt_term::cmd_getc ()
2906{ 2901{
2907 unicode_t c = next_char (); 2902 wchar_t c = next_char ();
2908 2903
2909 if (c == NOCHAR) 2904 if (c == NOCHAR)
2910 throw out_of_input; 2905 throw out_of_input;
2911 2906
2912 return c; 2907 return c;
2913} 2908}
2914 2909
2915unicode_t 2910uint32_t
2916rxvt_term::cmd_get8 () 2911rxvt_term::cmd_get8 ()
2917{ 2912{
2918 unicode_t c = next_octet (); 2913 uint32_t c = next_octet ();
2919 2914
2920 if (c == NOCHAR) 2915 if (c == NOCHAR)
2921 throw out_of_input; 2916 throw out_of_input;
2922 2917
2923 return c; 2918 return c;
3190 break; 3185 break;
3191 3186
3192 /* 8.3.87: NEXT LINE */ 3187 /* 8.3.87: NEXT LINE */
3193 case C1_NEL: /* ESC E */ 3188 case C1_NEL: /* ESC E */
3194 { 3189 {
3195 unicode_t nlcr[] = { C0_LF, C0_CR }; 3190 wchar_t nlcr[] = { C0_LF, C0_CR };
3196 scr_add_lines (nlcr, 1, 2); 3191 scr_add_lines (nlcr, sizeof (nlcr) / sizeof (nlcr [0]), 1);
3197 } 3192 }
3198 break; 3193 break;
3199 3194
3200 /* kidnapped escape sequence: Should be 8.3.48 */ 3195 /* kidnapped escape sequence: Should be 8.3.48 */
3201 case C1_ESA: /* ESC G */ 3196 case C1_ESA: /* ESC G */
4029 break; 4024 break;
4030#endif 4025#endif
4031 4026
4032#if ENABLE_PERL 4027#if ENABLE_PERL
4033 case URxvt_perl: 4028 case URxvt_perl:
4034 if (HOOK_INVOKE ((this, HOOK_OSC_SEQ, DT_STRING, str, DT_END))) 4029 if (HOOK_INVOKE ((this, HOOK_OSC_SEQ, DT_STR, str, DT_END)))
4035 ; // no responses yet 4030 ; // no responses yet
4036 break; 4031 break;
4037#endif 4032#endif
4038 } 4033 }
4039} 4034}
4151 /* extra handling for values with state unkept */ 4146 /* extra handling for values with state unkept */
4152 switch (arg[i]) 4147 switch (arg[i])
4153 { 4148 {
4154#if ENABLE_STYLES 4149#if ENABLE_STYLES
4155 case 1021: 4150 case 1021:
4156 if (mode) 4151 set_option (Opt_intensityStyles, mode);
4157 SET_OPTION (Opt_intensityStyles);
4158 else
4159 CLR_OPTION (Opt_intensityStyles);
4160 4152
4161 scr_touch (true); 4153 scr_touch (true);
4162 break; 4154 break;
4163#endif 4155#endif
4164 case 1048: /* alternative cursor save */ 4156 case 1048: /* alternative cursor save */
4186 case 3: /* 80/132 */ 4178 case 3: /* 80/132 */
4187 if (priv_modes & PrivMode_132OK) 4179 if (priv_modes & PrivMode_132OK)
4188 set_widthheight (((state ? 132 : 80) * fwidth), height); 4180 set_widthheight (((state ? 132 : 80) * fwidth), height);
4189 break; 4181 break;
4190 case 4: /* smooth scrolling */ 4182 case 4: /* smooth scrolling */
4191 if (!state) 4183 set_option (Opt_jumpScroll, !state);
4192 SET_OPTION (Opt_jumpScroll);
4193 else
4194 CLR_OPTION (Opt_jumpScroll);
4195 break; 4184 break;
4196 case 5: /* reverse video */ 4185 case 5: /* reverse video */
4197 scr_rvideo_mode (state); 4186 scr_rvideo_mode (state);
4198 break; 4187 break;
4199 case 6: /* relative/absolute origins */ 4188 case 6: /* relative/absolute origins */
4240#if 0 4229#if 0
4241 case 1001: 4230 case 1001:
4242 break; /* X11 mouse highlighting */ 4231 break; /* X11 mouse highlighting */
4243#endif 4232#endif
4244 case 1010: /* scroll to bottom on TTY output inhibit */ 4233 case 1010: /* scroll to bottom on TTY output inhibit */
4245 if (!state) 4234 set_option (Opt_scrollTtyOutput, !state);
4246 SET_OPTION (Opt_scrollTtyOutput);
4247 else
4248 CLR_OPTION (Opt_scrollTtyOutput);
4249 break; 4235 break;
4250 case 1011: /* scroll to bottom on key press */ 4236 case 1011: /* scroll to bottom on key press */
4251 if (state) 4237 set_option (Opt_scrollTtyKeypress, state);
4252 SET_OPTION (Opt_scrollTtyKeypress);
4253 else
4254 CLR_OPTION (Opt_scrollTtyKeypress);
4255 break; 4238 break;
4256 case 1047: /* secondary screen w/ clearing last */ 4239 case 1047: /* secondary screen w/ clearing last */
4257 if (OPTION (Opt_secondaryScreen)) 4240 if (OPTION (Opt_secondaryScreen))
4258 if (current_screen != PRIMARY) 4241 if (current_screen != PRIMARY)
4259 scr_erase_screen (2); 4242 scr_erase_screen (2);
4469const unsigned int MAX_PTY_WRITE = 255; // minimum MAX_INPUT 4452const unsigned int MAX_PTY_WRITE = 255; // minimum MAX_INPUT
4470 4453
4471void 4454void
4472rxvt_term::tt_write (const char *data, unsigned int len) 4455rxvt_term::tt_write (const char *data, unsigned int len)
4473{ 4456{
4457 if (HOOK_INVOKE ((this, HOOK_TT_WRITE, DT_STR_LEN, data, len, DT_END)))
4458 return;
4459
4474 if (pty.pty < 0) 4460 if (pty.pty < 0)
4475 return; 4461 return;
4476 4462
4477 if (v_buflen == 0) 4463 if (v_buflen == 0)
4478 { 4464 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines