… | |
… | |
24 | * This file handles _all_ screen updates and selections |
24 | * This file handles _all_ screen updates and selections |
25 | */ |
25 | */ |
26 | |
26 | |
27 | #include "../config.h" /* NECESSARY */ |
27 | #include "../config.h" /* NECESSARY */ |
28 | #include "rxvt.h" /* NECESSARY */ |
28 | #include "rxvt.h" /* NECESSARY */ |
|
|
29 | #include "rxvtperl.h" /* NECESSARY */ |
29 | |
30 | |
30 | #include <X11/Xmd.h> /* get the typedef for CARD32 */ |
31 | #include <X11/Xmd.h> /* get the typedef for CARD32 */ |
31 | |
32 | |
32 | #include <inttypes.h> |
33 | #include <inttypes.h> |
33 | |
34 | |
… | |
… | |
46 | |
47 | |
47 | /* ------------------------------------------------------------------------- * |
48 | /* ------------------------------------------------------------------------- * |
48 | * GENERAL SCREEN AND SELECTION UPDATE ROUTINES * |
49 | * GENERAL SCREEN AND SELECTION UPDATE ROUTINES * |
49 | * ------------------------------------------------------------------------- */ |
50 | * ------------------------------------------------------------------------- */ |
50 | #define ZERO_SCROLLBACK() \ |
51 | #define ZERO_SCROLLBACK() \ |
51 | if (options & Opt_scrollTtyOutput) \ |
52 | if (OPTION (Opt_scrollTtyOutput)) \ |
52 | view_start = 0 |
53 | view_start = 0 |
53 | #define CLEAR_SELECTION() \ |
54 | #define CLEAR_SELECTION() \ |
54 | selection.beg.row = selection.beg.col \ |
55 | selection.beg.row = selection.beg.col \ |
55 | = selection.end.row = selection.end.col = 0 |
56 | = selection.end.row = selection.end.col = 0 |
56 | #define CLEAR_ALL_SELECTION() \ |
57 | #define CLEAR_ALL_SELECTION() \ |
… | |
… | |
417 | |
418 | |
418 | for (int col = ncol; col--; ) |
419 | for (int col = ncol; col--; ) |
419 | tabs [col] = col % TABSIZE == 0; |
420 | tabs [col] = col % TABSIZE == 0; |
420 | |
421 | |
421 | tt_winch (); |
422 | tt_winch (); |
|
|
423 | |
|
|
424 | PERL_INVOKE ((this, HOOK_RESET, DT_END)); |
422 | } |
425 | } |
423 | |
426 | |
424 | /* ------------------------------------------------------------------------- */ |
427 | /* ------------------------------------------------------------------------- */ |
425 | /* |
428 | /* |
426 | * Free everything. That way malloc debugging can find leakage. |
429 | * Free everything. That way malloc debugging can find leakage. |
… | |
… | |
530 | |
533 | |
531 | screen.cur.row = clamp (screen.cur.row, 0, prev_nrow - 1); |
534 | screen.cur.row = clamp (screen.cur.row, 0, prev_nrow - 1); |
532 | screen.cur.col = clamp (screen.cur.col, 0, prev_ncol - 1); |
535 | screen.cur.col = clamp (screen.cur.col, 0, prev_ncol - 1); |
533 | |
536 | |
534 | #if NSCREENS |
537 | #if NSCREENS |
535 | if (options & Opt_secondaryScreen) |
538 | if (OPTION (Opt_secondaryScreen)) |
536 | { |
539 | { |
537 | num_scr = 0; |
540 | num_scr = 0; |
538 | |
541 | |
539 | for (int i = prev_nrow; i--; ) |
542 | for (int i = prev_nrow; i--; ) |
540 | ::swap (ROW(i), swap_buf [i]); |
543 | ::swap (ROW(i), swap_buf [i]); |
… | |
… | |
544 | screen.flags |= Screen_VisibleCursor; |
547 | screen.flags |= Screen_VisibleCursor; |
545 | swap.flags |= Screen_VisibleCursor; |
548 | swap.flags |= Screen_VisibleCursor; |
546 | } |
549 | } |
547 | else |
550 | else |
548 | #endif |
551 | #endif |
549 | if (options & Opt_secondaryScroll) |
552 | if (OPTION (Opt_secondaryScroll)) |
550 | scr_scroll_text (0, prev_nrow - 1, prev_nrow); |
553 | scr_scroll_text (0, prev_nrow - 1, prev_nrow); |
551 | |
554 | |
552 | return scrn; |
555 | return scrn; |
553 | } |
556 | } |
554 | |
557 | |
… | |
… | |
616 | num_scr += count; |
619 | num_scr += count; |
617 | |
620 | |
618 | if (count > 0 |
621 | if (count > 0 |
619 | && row1 == 0 |
622 | && row1 == 0 |
620 | && row2 == nrow - 1 |
623 | && row2 == nrow - 1 |
621 | && (current_screen == PRIMARY || options & Opt_secondaryScroll)) |
624 | && (current_screen == PRIMARY || OPTION (Opt_secondaryScroll))) |
622 | { |
625 | { |
623 | nsaved = min (nsaved + count, saveLines); |
626 | nsaved = min (nsaved + count, saveLines); |
|
|
627 | |
|
|
628 | PERL_INVOKE ((this, HOOK_SCROLL_BACK, DT_INT, count, DT_INT, nsaved, DT_END)); |
|
|
629 | |
624 | term_start = (term_start + count) % total_rows; |
630 | term_start = (term_start + count) % total_rows; |
625 | |
631 | |
626 | if (selection.op && current_screen == selection.screen) |
632 | if (selection.op && current_screen == selection.screen) |
627 | { |
633 | { |
628 | selection.beg.row -= count; |
634 | selection.beg.row -= count; |
… | |
… | |
642 | { |
648 | { |
643 | ROW(row2 - i).l = 0; |
649 | ROW(row2 - i).l = 0; |
644 | scr_blank_screen_mem (ROW(row2 - i), rstyle); |
650 | scr_blank_screen_mem (ROW(row2 - i), rstyle); |
645 | } |
651 | } |
646 | |
652 | |
647 | if ((options & Opt_scrollWithBuffer) |
653 | if (OPTION (Opt_scrollWithBuffer) |
648 | && view_start != 0 |
654 | && view_start != 0 |
649 | && view_start != saveLines) |
655 | && view_start != saveLines) |
650 | scr_page (UP, count); |
656 | scr_page (UP, count); |
651 | } |
657 | } |
652 | else |
658 | else |
… | |
… | |
1018 | if (count) |
1024 | if (count) |
1019 | x = ncol - 1; |
1025 | x = ncol - 1; |
1020 | |
1026 | |
1021 | // store horizontal tab commands as characters inside the text |
1027 | // store horizontal tab commands as characters inside the text |
1022 | // buffer so they can be selected and pasted. |
1028 | // buffer so they can be selected and pasted. |
1023 | if (ht && options & Opt_pastableTabs) |
1029 | if (ht && OPTION (Opt_pastableTabs)) |
1024 | { |
1030 | { |
1025 | base_rend = SET_FONT (base_rend, 0); |
1031 | base_rend = SET_FONT (base_rend, 0); |
1026 | |
1032 | |
1027 | if (!l.is_longer ()) /* XXX: think about this */ |
1033 | if (!l.is_longer ()) /* XXX: think about this */ |
1028 | max_it (l.l, x); |
1034 | max_it (l.l, x); |
… | |
… | |
1593 | ::swap (pix_colors[Color_fg], pix_colors[Color_bg]); |
1599 | ::swap (pix_colors[Color_fg], pix_colors[Color_bg]); |
1594 | #if XPM_BACKGROUND |
1600 | #if XPM_BACKGROUND |
1595 | if (bgPixmap.pixmap == None) |
1601 | if (bgPixmap.pixmap == None) |
1596 | #endif |
1602 | #endif |
1597 | #if TRANSPARENT |
1603 | #if TRANSPARENT |
1598 | if (! (options & Opt_transparent) || am_transparent == 0) |
1604 | if (! OPTION (Opt_transparent) || am_transparent == 0) |
1599 | #endif |
1605 | #endif |
1600 | XSetWindowBackground (display->display, vt, |
1606 | XSetWindowBackground (display->display, vt, |
1601 | pix_colors[Color_bg]); |
1607 | pix_colors[Color_bg]); |
1602 | |
1608 | |
1603 | gcvalue.foreground = pix_colors[Color_fg]; |
1609 | gcvalue.foreground = pix_colors[Color_fg]; |
… | |
… | |
1819 | } |
1825 | } |
1820 | |
1826 | |
1821 | int |
1827 | int |
1822 | rxvt_term::scr_changeview (unsigned int oldviewstart) |
1828 | rxvt_term::scr_changeview (unsigned int oldviewstart) |
1823 | { |
1829 | { |
|
|
1830 | PERL_INVOKE ((this, HOOK_VIEW_CHANGE, DT_INT, view_start, DT_END)); |
|
|
1831 | |
1824 | if (view_start != oldviewstart) |
1832 | if (view_start != oldviewstart) |
1825 | { |
1833 | { |
1826 | want_refresh = 1; |
1834 | want_refresh = 1; |
1827 | num_scr -= (view_start - oldviewstart); |
1835 | num_scr -= (view_start - oldviewstart); |
1828 | } |
1836 | } |
… | |
… | |
1836 | { |
1844 | { |
1837 | #ifndef NO_BELL |
1845 | #ifndef NO_BELL |
1838 | |
1846 | |
1839 | # ifndef NO_MAPALERT |
1847 | # ifndef NO_MAPALERT |
1840 | # ifdef MAPALERT_OPTION |
1848 | # ifdef MAPALERT_OPTION |
1841 | if (options & Opt_mapAlert) |
1849 | if (OPTION (Opt_mapAlert)) |
1842 | # endif |
1850 | # endif |
1843 | XMapWindow (display->display, parent[0]); |
1851 | XMapWindow (display->display, parent[0]); |
1844 | # endif |
1852 | # endif |
1845 | |
1853 | |
1846 | if (options & Opt_visualBell) |
1854 | if (OPTION (Opt_visualBell)) |
1847 | { |
1855 | { |
1848 | scr_rvideo_mode (!rvideo); /* refresh also done */ |
1856 | scr_rvideo_mode (!rvideo); /* refresh also done */ |
1849 | rxvt_usleep (VISUAL_BELL_DURATION); |
1857 | rxvt_usleep (VISUAL_BELL_DURATION); |
1850 | scr_rvideo_mode (!rvideo); /* refresh also done */ |
1858 | scr_rvideo_mode (!rvideo); /* refresh also done */ |
1851 | } |
1859 | } |
… | |
… | |
1942 | |
1950 | |
1943 | #if XPM_BACKGROUND |
1951 | #if XPM_BACKGROUND |
1944 | must_clear |= bgPixmap.pixmap != None; |
1952 | must_clear |= bgPixmap.pixmap != None; |
1945 | #endif |
1953 | #endif |
1946 | #if TRANSPARENT |
1954 | #if TRANSPARENT |
1947 | must_clear |= (options & Opt_transparent) && am_transparent; |
1955 | must_clear |= OPTION (Opt_transparent) && am_transparent; |
1948 | #endif |
1956 | #endif |
1949 | ocrow = oldcursor.row; /* is there an old outline cursor on screen? */ |
1957 | ocrow = oldcursor.row; /* is there an old outline cursor on screen? */ |
1950 | |
1958 | |
1951 | /* |
1959 | /* |
1952 | * B: reverse any characters which are selected |
1960 | * B: reverse any characters which are selected |
… | |
… | |
1976 | |
1984 | |
1977 | crp = &ROW(screen.cur.row).r[col]; |
1985 | crp = &ROW(screen.cur.row).r[col]; |
1978 | |
1986 | |
1979 | if (showcursor && focus) |
1987 | if (showcursor && focus) |
1980 | { |
1988 | { |
1981 | if (options & Opt_cursorUnderline) |
1989 | if (OPTION (Opt_cursorUnderline)) |
1982 | *crp ^= RS_Uline; |
1990 | *crp ^= RS_Uline; |
1983 | else |
1991 | else |
1984 | { |
1992 | { |
1985 | *crp ^= RS_RVid; |
1993 | *crp ^= RS_RVid; |
1986 | |
1994 | |
… | |
… | |
2039 | oldcursor.col = screen.cur.col; |
2047 | oldcursor.col = screen.cur.col; |
2040 | } |
2048 | } |
2041 | } |
2049 | } |
2042 | } |
2050 | } |
2043 | |
2051 | |
|
|
2052 | PERL_INVOKE ((this, HOOK_REFRESH_BEGIN, DT_END)); |
2044 | #if ENABLE_OVERLAY |
2053 | #if ENABLE_OVERLAY |
2045 | scr_swap_overlay (); |
2054 | scr_swap_overlay (); |
2046 | #endif |
2055 | #endif |
2047 | |
2056 | |
2048 | #ifndef NO_SLOW_LINK_SUPPORT |
2057 | #ifndef NO_SLOW_LINK_SUPPORT |
… | |
… | |
2098 | if (wlen < len) |
2107 | if (wlen < len) |
2099 | ::swap (wlen, len); |
2108 | ::swap (wlen, len); |
2100 | |
2109 | |
2101 | XCopyArea (display->display, vt, vt, |
2110 | XCopyArea (display->display, vt, vt, |
2102 | gc, 0, Row2Pixel (len + i), |
2111 | gc, 0, Row2Pixel (len + i), |
2103 | (unsigned int)TermWin_TotalWidth (), |
2112 | (unsigned int)this->width, |
2104 | (unsigned int)Height2Pixel (wlen - len + 1), |
2113 | (unsigned int)Height2Pixel (wlen - len + 1), |
2105 | 0, Row2Pixel (len)); |
2114 | 0, Row2Pixel (len)); |
2106 | len = -1; |
2115 | len = -1; |
2107 | } |
2116 | } |
2108 | } |
2117 | } |
… | |
… | |
2311 | } /* for (row....) */ |
2320 | } /* for (row....) */ |
2312 | |
2321 | |
2313 | #if ENABLE_OVERLAY |
2322 | #if ENABLE_OVERLAY |
2314 | scr_swap_overlay (); |
2323 | scr_swap_overlay (); |
2315 | #endif |
2324 | #endif |
|
|
2325 | PERL_INVOKE ((this, HOOK_REFRESH_END, DT_END)); |
2316 | |
2326 | |
2317 | /* |
2327 | /* |
2318 | * G: cleanup cursor and display outline cursor if necessary |
2328 | * G: cleanup cursor and display outline cursor if necessary |
2319 | */ |
2329 | */ |
2320 | if (showcursor) |
2330 | if (showcursor) |
2321 | { |
2331 | { |
2322 | if (focus) |
2332 | if (focus) |
2323 | { |
2333 | { |
2324 | if (options & Opt_cursorUnderline) |
2334 | if (OPTION (Opt_cursorUnderline)) |
2325 | *crp ^= RS_Uline; |
2335 | *crp ^= RS_Uline; |
2326 | else |
2336 | else |
2327 | { |
2337 | { |
2328 | *crp ^= RS_RVid; |
2338 | *crp ^= RS_RVid; |
2329 | #ifndef NO_CURSORCOLOR |
2339 | #ifndef NO_CURSORCOLOR |
… | |
… | |
2456 | |
2466 | |
2457 | for (col = selection.beg.col; col < selection.end.col; col++) |
2467 | for (col = selection.beg.col; col < selection.end.col; col++) |
2458 | srp[col] ^= RS_RVid; |
2468 | srp[col] ^= RS_RVid; |
2459 | |
2469 | |
2460 | while (col-- > selection.beg.col && (stp[col] == NOCHAR || unicode::is_space (stp[col]))) |
2470 | while (col-- > selection.beg.col && (stp[col] == NOCHAR || unicode::is_space (stp[col]))) |
|
|
2471 | srp[col] ^= RS_RVid | RS_Uline; |
|
|
2472 | |
|
|
2473 | if (++col < selection.end.col) |
2461 | srp[col] ^= RS_RVid | RS_Uline; |
2474 | srp[col] ^= RS_RVid | RS_Uline; |
2462 | } |
2475 | } |
2463 | } |
2476 | } |
2464 | else |
2477 | else |
2465 | #endif |
2478 | #endif |
… | |
… | |
2551 | /* ------------------------------------------------------------------------- */ |
2564 | /* ------------------------------------------------------------------------- */ |
2552 | /* |
2565 | /* |
2553 | * Paste a selection direct to the command fd |
2566 | * Paste a selection direct to the command fd |
2554 | */ |
2567 | */ |
2555 | void |
2568 | void |
2556 | rxvt_term::paste (unsigned char *data, unsigned int len) |
2569 | rxvt_term::paste (char *data, unsigned int len) |
2557 | { |
2570 | { |
2558 | /* convert normal newline chars into common keyboard Return key sequence */ |
2571 | /* convert normal newline chars into common keyboard Return key sequence */ |
2559 | for (unsigned int i = 0; i < len; i++) |
2572 | for (unsigned int i = 0; i < len; i++) |
2560 | if (data[i] == C0_LF) |
2573 | if (data[i] == C0_LF) |
2561 | data[i] = C0_CR; |
2574 | data[i] = C0_CR; |
… | |
… | |
2705 | { |
2718 | { |
2706 | wchar_t *w = rxvt_utf8towcs ((const char *)ct.value, ct.nitems); |
2719 | wchar_t *w = rxvt_utf8towcs ((const char *)ct.value, ct.nitems); |
2707 | char *s = rxvt_wcstombs (w); |
2720 | char *s = rxvt_wcstombs (w); |
2708 | free (w); |
2721 | free (w); |
2709 | // TODO: strlen == only the first element will be converted. well... |
2722 | // TODO: strlen == only the first element will be converted. well... |
2710 | paste ((unsigned char *)s, strlen (s)); |
2723 | paste (s, strlen (s)); |
2711 | free (s); |
2724 | free (s); |
2712 | } |
2725 | } |
2713 | else |
2726 | else |
2714 | #endif |
2727 | #endif |
2715 | if (XmbTextPropertyToTextList (display->display, &ct, &cl, &cr) >= 0 |
2728 | if (XmbTextPropertyToTextList (display->display, &ct, &cl, &cr) >= 0 |
2716 | && cl) |
2729 | && cl) |
2717 | { |
2730 | { |
2718 | for (int i = 0; i < cr; i++) |
2731 | for (int i = 0; i < cr; i++) |
2719 | paste ((unsigned char *)cl[i], strlen (cl[i])); |
2732 | paste (cl[i], strlen (cl[i])); |
2720 | |
2733 | |
2721 | XFreeStringList (cl); |
2734 | XFreeStringList (cl); |
2722 | } |
2735 | } |
2723 | else |
2736 | else |
2724 | paste (ct.value, ct.nitems); // paste raw |
2737 | paste ((char *)ct.value, ct.nitems); // paste raw |
2725 | |
2738 | |
2726 | bailout: |
2739 | bailout: |
2727 | XFree (ct.value); |
2740 | XFree (ct.value); |
2728 | |
2741 | |
2729 | if (selection_wait == Sel_normal) |
2742 | if (selection_wait == Sel_normal) |
… | |
… | |
2767 | return; /* outside window */ |
2780 | return; /* outside window */ |
2768 | |
2781 | |
2769 | if (selection.text) |
2782 | if (selection.text) |
2770 | { /* internal selection */ |
2783 | { /* internal selection */ |
2771 | char *str = rxvt_wcstombs (selection.text, selection.len); |
2784 | char *str = rxvt_wcstombs (selection.text, selection.len); |
2772 | paste ((unsigned char *)str, strlen (str)); |
2785 | paste (str, strlen (str)); |
2773 | free (str); |
2786 | free (str); |
2774 | return; |
2787 | return; |
2775 | } |
2788 | } |
2776 | else |
2789 | else |
2777 | { |
2790 | { |
… | |
… | |
2869 | selection.op = SELECTION_DONE; |
2882 | selection.op = SELECTION_DONE; |
2870 | |
2883 | |
2871 | if (selection.clicks == 4) |
2884 | if (selection.clicks == 4) |
2872 | return; /* nothing selected, go away */ |
2885 | return; /* nothing selected, go away */ |
2873 | |
2886 | |
|
|
2887 | if (PERL_INVOKE ((this, HOOK_SEL_MAKE, DT_LONG, (long)tm, DT_END))) |
|
|
2888 | return; |
|
|
2889 | |
2874 | i = (selection.end.row - selection.beg.row + 1) * (ncol + 1); |
2890 | i = (selection.end.row - selection.beg.row + 1) * (ncol + 1); |
2875 | new_selection_text = (wchar_t *)rxvt_malloc ((i + 4) * sizeof (wchar_t)); |
2891 | new_selection_text = (wchar_t *)rxvt_malloc ((i + 4) * sizeof (wchar_t)); |
2876 | |
2892 | |
2877 | int ofs = 0; |
2893 | int ofs = 0; |
2878 | int extra = 0; |
2894 | int extra = 0; |
… | |
… | |
2960 | |
2976 | |
2961 | // we usually allocate much more than necessary, so realloc it smaller again |
2977 | // we usually allocate much more than necessary, so realloc it smaller again |
2962 | selection.len = ofs; |
2978 | selection.len = ofs; |
2963 | selection.text = (wchar_t *)rxvt_realloc (new_selection_text, (ofs + 1) * sizeof (wchar_t)); |
2979 | selection.text = (wchar_t *)rxvt_realloc (new_selection_text, (ofs + 1) * sizeof (wchar_t)); |
2964 | |
2980 | |
|
|
2981 | if (PERL_INVOKE ((this, HOOK_SEL_GRAB, DT_LONG, (long)tm, DT_END))) |
|
|
2982 | return; |
|
|
2983 | |
|
|
2984 | selection_grab (tm); |
|
|
2985 | } |
|
|
2986 | |
|
|
2987 | bool |
|
|
2988 | rxvt_term::selection_grab (Time tm) |
|
|
2989 | { |
|
|
2990 | selection_time = tm; |
|
|
2991 | |
2965 | XSetSelectionOwner (display->display, XA_PRIMARY, vt, tm); |
2992 | XSetSelectionOwner (display->display, XA_PRIMARY, vt, tm); |
2966 | if (XGetSelectionOwner (display->display, XA_PRIMARY) == vt) |
2993 | if (XGetSelectionOwner (display->display, XA_PRIMARY) == vt) |
|
|
2994 | { |
2967 | display->set_selection_owner (this); |
2995 | display->set_selection_owner (this); |
|
|
2996 | return true; |
|
|
2997 | } |
2968 | else |
2998 | else |
2969 | rxvt_warn ("can't get primary selection, ignoring.\n"); |
2999 | return false; |
2970 | |
3000 | |
2971 | #if 0 |
3001 | #if 0 |
2972 | XTextProperty ct; |
3002 | XTextProperty ct; |
2973 | |
3003 | |
2974 | if (XwcTextListToTextProperty (display->display, &selection.text, 1, XStringStyle, &ct) >= 0) |
3004 | if (XwcTextListToTextProperty (display->display, &selection.text, 1, XStringStyle, &ct) >= 0) |
2975 | { |
3005 | { |
2976 | set_string_property (XA_CUT_BUFFER0, ct.value, ct.nitems); |
3006 | set_string_property (XA_CUT_BUFFER0, ct.value, ct.nitems); |
2977 | XFree (ct.value); |
3007 | XFree (ct.value); |
2978 | } |
3008 | } |
2979 | #endif |
3009 | #endif |
2980 | |
|
|
2981 | selection_time = tm; |
|
|
2982 | } |
3010 | } |
2983 | |
3011 | |
2984 | /* ------------------------------------------------------------------------- */ |
3012 | /* ------------------------------------------------------------------------- */ |
2985 | /* |
3013 | /* |
2986 | * Mark or select text based upon number of clicks: 1, 2, or 3 |
3014 | * Mark or select text based upon number of clicks: 1, 2, or 3 |
… | |
… | |
3108 | } |
3136 | } |
3109 | } |
3137 | } |
3110 | break; |
3138 | break; |
3111 | } |
3139 | } |
3112 | |
3140 | |
3113 | Old_Word_Selection_You_Die: |
|
|
3114 | if (dirn == DN) |
3141 | if (dirn == DN) |
3115 | col++; /* put us on one past the end */ |
3142 | col++; /* put us on one past the end */ |
3116 | |
3143 | |
3117 | /* Poke the values back in */ |
3144 | /* Poke the values back in */ |
3118 | ret->row = row; |
3145 | ret->row = row; |
… | |
… | |
3295 | else if (selection.clicks == 2) |
3322 | else if (selection.clicks == 2) |
3296 | { |
3323 | { |
3297 | if (ROWCOL_IS_AFTER (selection.end, selection.beg)) |
3324 | if (ROWCOL_IS_AFTER (selection.end, selection.beg)) |
3298 | selection.end.col--; |
3325 | selection.end.col--; |
3299 | |
3326 | |
|
|
3327 | if (!PERL_INVOKE ((this, HOOK_SEL_EXTEND, DT_END))) |
|
|
3328 | { |
3300 | selection_delimit_word (UP, &selection.beg, &selection.beg); |
3329 | selection_delimit_word (UP, &selection.beg, &selection.beg); |
3301 | selection_delimit_word (DN, &selection.end, &selection.end); |
3330 | selection_delimit_word (DN, &selection.end, &selection.end); |
|
|
3331 | } |
3302 | } |
3332 | } |
3303 | else if (selection.clicks == 3) |
3333 | else if (selection.clicks == 3) |
3304 | { |
3334 | { |
3305 | #if ENABLE_FRILLS |
3335 | #if ENABLE_FRILLS |
3306 | if (options & Opt_tripleclickwords) |
3336 | if (OPTION (Opt_tripleclickwords)) |
3307 | { |
3337 | { |
3308 | selection_delimit_word (UP, &selection.beg, &selection.beg); |
3338 | selection_delimit_word (UP, &selection.beg, &selection.beg); |
3309 | |
3339 | |
3310 | for (int end_row = selection.mark.row; end_row < nrow; end_row++) |
3340 | for (int end_row = selection.mark.row; end_row < nrow; end_row++) |
3311 | { |
3341 | { |
… | |
… | |
3582 | |
3612 | |
3583 | #if ENABLE_OVERLAY |
3613 | #if ENABLE_OVERLAY |
3584 | void |
3614 | void |
3585 | rxvt_term::scr_overlay_new (int x, int y, int w, int h) |
3615 | rxvt_term::scr_overlay_new (int x, int y, int w, int h) |
3586 | { |
3616 | { |
3587 | if (nrow < 3 || ncol < 3) |
3617 | if (nrow < 1 || ncol < 1) |
3588 | return; |
3618 | return; |
3589 | |
3619 | |
3590 | want_refresh = 1; |
3620 | want_refresh = 1; |
3591 | |
3621 | |
3592 | scr_overlay_off (); |
3622 | scr_overlay_off (); |