… | |
… | |
967 | } |
967 | } |
968 | #endif |
968 | #endif |
969 | |
969 | |
970 | if (want_refresh) |
970 | if (want_refresh) |
971 | { |
971 | { |
|
|
972 | if (SHOULD_INVOKE (HOOK_LINE_UPDATE)) |
|
|
973 | { |
|
|
974 | int row = -view_start; |
|
|
975 | |
|
|
976 | while (row > -nsaved && ROW (row - 1).is_longer ()) |
|
|
977 | --row; |
|
|
978 | |
|
|
979 | while (row < -view_start + nrow) |
|
|
980 | { |
|
|
981 | int start_row = row; |
|
|
982 | line_t *l; |
|
|
983 | |
|
|
984 | do |
|
|
985 | { |
|
|
986 | l = &ROW (row); |
|
|
987 | |
|
|
988 | if (!(l->f & LINE_FILTERED)) |
|
|
989 | { |
|
|
990 | // line not filtered, mark it as filtered |
|
|
991 | l->f |= LINE_FILTERED; |
|
|
992 | while (l->is_longer ()) |
|
|
993 | { |
|
|
994 | l = &ROW (++row); |
|
|
995 | l->f |= LINE_FILTERED; |
|
|
996 | } |
|
|
997 | |
|
|
998 | // and filter it |
|
|
999 | HOOK_INVOKE ((this, HOOK_LINE_UPDATE, DT_INT, start_row, DT_END)); |
|
|
1000 | |
|
|
1001 | break; |
|
|
1002 | } |
|
|
1003 | } |
|
|
1004 | while (l->is_longer ()); |
|
|
1005 | |
|
|
1006 | row++; |
|
|
1007 | } |
|
|
1008 | |
|
|
1009 | } |
|
|
1010 | |
972 | scr_refresh (refresh_type); |
1011 | scr_refresh (refresh_type); |
973 | scrollbar_show (1); |
1012 | scrollbar_show (1); |
974 | #ifdef USE_XIM |
1013 | #ifdef USE_XIM |
975 | IMSendSpot (); |
1014 | IMSendSpot (); |
976 | #endif |
1015 | #endif |
… | |
… | |
1702 | if (!focus) |
1741 | if (!focus) |
1703 | { |
1742 | { |
1704 | focus = 1; |
1743 | focus = 1; |
1705 | want_refresh = 1; |
1744 | want_refresh = 1; |
1706 | |
1745 | |
1707 | PERL_INVOKE ((this, HOOK_FOCUS_OUT, DT_END)); |
1746 | HOOK_INVOKE ((this, HOOK_FOCUS_OUT, DT_END)); |
1708 | |
1747 | |
1709 | #if USE_XIM |
1748 | #if USE_XIM |
1710 | if (Input_Context != NULL) |
1749 | if (Input_Context != NULL) |
1711 | { |
1750 | { |
1712 | IMSetStatusPosition (); |
1751 | IMSetStatusPosition (); |
… | |
… | |
1733 | if (focus) |
1772 | if (focus) |
1734 | { |
1773 | { |
1735 | focus = 0; |
1774 | focus = 0; |
1736 | want_refresh = 1; |
1775 | want_refresh = 1; |
1737 | |
1776 | |
1738 | PERL_INVOKE ((this, HOOK_FOCUS_OUT, DT_END)); |
1777 | HOOK_INVOKE ((this, HOOK_FOCUS_OUT, DT_END)); |
1739 | |
1778 | |
1740 | #if ENABLE_FRILLS || ISO_14755 |
1779 | #if ENABLE_FRILLS || ISO_14755 |
1741 | if (iso14755buf) |
1780 | if (iso14755buf) |
1742 | { |
1781 | { |
1743 | iso14755buf = 0; |
1782 | iso14755buf = 0; |
… | |
… | |
1855 | else |
1894 | else |
1856 | { |
1895 | { |
1857 | if (ev.button != MEvent.button) |
1896 | if (ev.button != MEvent.button) |
1858 | MEvent.clicks = 0; |
1897 | MEvent.clicks = 0; |
1859 | |
1898 | |
1860 | if (!PERL_INVOKE ((this, HOOK_MOUSE_CLICK, DT_XEVENT, &ev, DT_END))) |
1899 | if (!HOOK_INVOKE ((this, HOOK_MOUSE_CLICK, DT_XEVENT, &ev, DT_END))) |
1861 | switch (ev.button) |
1900 | switch (ev.button) |
1862 | { |
1901 | { |
1863 | case Button1: |
1902 | case Button1: |
1864 | /* allow meta + click to select rectangular areas */ |
1903 | /* allow meta + click to select rectangular areas */ |
1865 | /* should be done in screen.C */ |
1904 | /* should be done in screen.C */ |
… | |
… | |
2679 | { |
2718 | { |
2680 | if (ch == NOCHAR) |
2719 | if (ch == NOCHAR) |
2681 | { |
2720 | { |
2682 | seq_begin = cmdbuf_ptr; |
2721 | seq_begin = cmdbuf_ptr; |
2683 | ch = next_char (); |
2722 | ch = next_char (); |
2684 | } |
|
|
2685 | |
2723 | |
2686 | if (ch == NOCHAR) // TODO: improve |
2724 | if (ch == NOCHAR) |
2687 | break; |
2725 | break; |
|
|
2726 | } |
2688 | |
2727 | |
2689 | if (!IS_CONTROL (ch) || ch == C0_LF || ch == C0_CR || ch == C0_HT) |
2728 | if (!IS_CONTROL (ch) || ch == C0_LF || ch == C0_CR || ch == C0_HT) |
2690 | { |
2729 | { |
2691 | if (!seen_input) |
2730 | if (!seen_input) |
2692 | { |
2731 | { |
… | |
… | |
2733 | } |
2772 | } |
2734 | |
2773 | |
2735 | // scr_add_lines only works for nlines <= nrow - 1. |
2774 | // scr_add_lines only works for nlines <= nrow - 1. |
2736 | if (nlines >= nrow - 1) |
2775 | if (nlines >= nrow - 1) |
2737 | { |
2776 | { |
|
|
2777 | if (!HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_USTRING_LEN, buf, str - buf, DT_END))) |
2738 | scr_add_lines (buf, nlines, str - buf); |
2778 | scr_add_lines (buf, nlines, str - buf); |
|
|
2779 | |
2739 | nlines = 0; |
2780 | nlines = 0; |
2740 | str = buf; |
2781 | str = buf; |
2741 | eol = str + min (ncol, UBUFSIZ); |
2782 | eol = str + min (ncol, UBUFSIZ); |
2742 | } |
2783 | } |
2743 | |
2784 | |
… | |
… | |
2756 | |
2797 | |
2757 | seq_begin = cmdbuf_ptr; |
2798 | seq_begin = cmdbuf_ptr; |
2758 | ch = next_char (); |
2799 | ch = next_char (); |
2759 | } |
2800 | } |
2760 | |
2801 | |
|
|
2802 | if (!HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_USTRING_LEN, buf, str - buf, DT_END))) |
2761 | scr_add_lines (buf, nlines, str - buf); |
2803 | scr_add_lines (buf, nlines, str - buf); |
2762 | |
2804 | |
2763 | /* |
2805 | /* |
2764 | * If there have been a lot of new lines, then update the screen |
2806 | * If there have been a lot of new lines, then update the screen |
2765 | * What the heck I'll cheat and only refresh less than every page-full. |
2807 | * What the heck I'll cheat and only refresh less than every page-full. |
2766 | * the number of pages between refreshes is refresh_limit, which |
2808 | * the number of pages between refreshes is refresh_limit, which |
… | |
… | |
3972 | break; |
4014 | break; |
3973 | #endif |
4015 | #endif |
3974 | |
4016 | |
3975 | #if ENABLE_PERL |
4017 | #if ENABLE_PERL |
3976 | case URxvt_perl: |
4018 | case URxvt_perl: |
3977 | if (PERL_INVOKE ((this, HOOK_OSC_SEQ, DT_STRING, str, DT_END))) |
4019 | if (HOOK_INVOKE ((this, HOOK_OSC_SEQ, DT_STRING, str, DT_END))) |
3978 | ; // no responses yet |
4020 | ; // no responses yet |
3979 | break; |
4021 | break; |
3980 | #endif |
4022 | #endif |
3981 | } |
4023 | } |
3982 | } |
4024 | } |
… | |
… | |
4340 | scr_color (Color_bg, Color_bg); |
4382 | scr_color (Color_bg, Color_bg); |
4341 | break; |
4383 | break; |
4342 | |
4384 | |
4343 | //case 50: // not variable spacing |
4385 | //case 50: // not variable spacing |
4344 | |
4386 | |
4345 | #ifndef NO_BRIGHTCOLOR |
4387 | #if ENABLE_FRILLS |
4346 | case 90: |
4388 | case 90: |
4347 | case 91: /* set bright fg color */ |
4389 | case 91: /* set bright fg color */ |
4348 | case 92: |
4390 | case 92: |
4349 | case 93: |
4391 | case 93: |
4350 | case 94: |
4392 | case 94: |