… | |
… | |
39 | while (len--) |
39 | while (len--) |
40 | *start++ = value; |
40 | *start++ = value; |
41 | } |
41 | } |
42 | |
42 | |
43 | /* ------------------------------------------------------------------------- */ |
43 | /* ------------------------------------------------------------------------- */ |
44 | #define PROP_SIZE 16384 |
44 | #define PROP_SIZE 256*1024 |
|
|
45 | #define PASTE_SIZE 32768 |
45 | #define TABSIZE 8 /* default tab size */ |
46 | #define TABSIZE 8 /* default tab size */ |
46 | |
47 | |
47 | /* ------------------------------------------------------------------------- * |
48 | /* ------------------------------------------------------------------------- * |
48 | * GENERAL SCREEN AND SELECTION UPDATE ROUTINES * |
49 | * GENERAL SCREEN AND SELECTION UPDATE ROUTINES * |
49 | * ------------------------------------------------------------------------- */ |
50 | * ------------------------------------------------------------------------- */ |
… | |
… | |
293 | ralloc->free (drawn_rend[p]); |
294 | ralloc->free (drawn_rend[p]); |
294 | } |
295 | } |
295 | |
296 | |
296 | /* we have fewer rows so fix up cursor position */ |
297 | /* we have fewer rows so fix up cursor position */ |
297 | MIN_IT (screen.cur.row, (int32_t)nrow - 1); |
298 | MIN_IT (screen.cur.row, (int32_t)nrow - 1); |
298 | MIN_IT (swap.cur.row, (int32_t)nrow - 1); |
|
|
299 | |
299 | |
300 | scr_reset_realloc (); /* realloc _last_ */ |
300 | scr_reset_realloc (); /* realloc _last_ */ |
301 | } |
301 | } |
302 | else if (nrow > prev_nrow) |
302 | else if (nrow > prev_nrow) |
303 | { |
303 | { |
… | |
… | |
334 | scr_scroll_text (0, (int)nrow - 1, -k, 1); |
334 | scr_scroll_text (0, (int)nrow - 1, -k, 1); |
335 | screen.cur.row += k; |
335 | screen.cur.row += k; |
336 | screen.s_cur.row += k; |
336 | screen.s_cur.row += k; |
337 | TermWin.nscrolled -= k; |
337 | TermWin.nscrolled -= k; |
338 | } |
338 | } |
|
|
339 | |
339 | #ifdef DEBUG_STRICT |
340 | #ifdef DEBUG_STRICT |
340 | assert (screen.cur.row < TermWin.nrow); |
341 | assert (screen.cur.row < TermWin.nrow); |
341 | assert (swap.cur.row < TermWin.nrow); |
|
|
342 | #else /* drive with your eyes closed */ |
342 | #else /* drive with your eyes closed */ |
343 | |
|
|
344 | MIN_IT (screen.cur.row, nrow - 1); |
343 | MIN_IT (screen.cur.row, nrow - 1); |
345 | MIN_IT (swap.cur.row, nrow - 1); |
|
|
346 | #endif |
344 | #endif |
347 | TermWin.ncol = ncol; // save b/c scr_blank_screen_mem uses this |
345 | TermWin.ncol = ncol; // save b/c scr_blank_screen_mem uses this |
348 | } |
346 | } |
349 | |
347 | |
350 | /* resize columns */ |
348 | /* resize columns */ |
… | |
… | |
393 | } |
391 | } |
394 | |
392 | |
395 | } |
393 | } |
396 | |
394 | |
397 | MIN_IT (screen.cur.col, (int16_t)ncol - 1); |
395 | MIN_IT (screen.cur.col, (int16_t)ncol - 1); |
398 | MIN_IT (swap.cur.col, (int16_t)ncol - 1); |
|
|
399 | |
396 | |
400 | delete talloc; talloc = ta; |
397 | delete talloc; talloc = ta; |
401 | delete ralloc; ralloc = ra; |
398 | delete ralloc; ralloc = ra; |
402 | } |
399 | } |
403 | |
400 | |
… | |
… | |
565 | if (current_screen == scrn) |
562 | if (current_screen == scrn) |
566 | return scrn; |
563 | return scrn; |
567 | |
564 | |
568 | selection_check (2); /* check for boundary cross */ |
565 | selection_check (2); /* check for boundary cross */ |
569 | |
566 | |
570 | SWAP_IT (current_screen, scrn, int); |
567 | i = current_screen; current_screen = scrn; scrn = i; |
571 | |
568 | |
572 | SWAP_IT (screen.cur.row, swap.cur.row, int16_t); |
569 | SWAP_IT (screen.cur.row, swap.cur.row, int16_t); |
573 | SWAP_IT (screen.cur.col, swap.cur.col, int16_t); |
570 | SWAP_IT (screen.cur.col, swap.cur.col, int16_t); |
574 | # ifdef DEBUG_STRICT |
|
|
575 | assert (screen.cur.row >= 0 && screen.cur.row < prev_nrow); |
|
|
576 | assert (screen.cur.col >= 0 && screen.cur.col < prev_ncol); |
|
|
577 | # else /* drive with your eyes closed */ |
|
|
578 | MAX_IT (screen.cur.row, 0); |
571 | MAX_IT (screen.cur.row, 0); |
579 | MIN_IT (screen.cur.row, (int32_t)prev_nrow - 1); |
572 | MIN_IT (screen.cur.row, (int32_t)prev_nrow - 1); |
580 | MAX_IT (screen.cur.col, 0); |
573 | MAX_IT (screen.cur.col, 0); |
581 | MIN_IT (screen.cur.col, (int32_t)prev_ncol - 1); |
574 | MIN_IT (screen.cur.col, (int32_t)prev_ncol - 1); |
582 | # endif |
|
|
583 | |
575 | |
584 | #if NSCREENS |
576 | #if NSCREENS |
585 | if (options & Opt_secondaryScreen) |
577 | if (options & Opt_secondaryScreen) |
586 | { |
578 | { |
587 | num_scr = 0; |
579 | num_scr = 0; |
… | |
… | |
600 | swap.flags |= Screen_VisibleCursor; |
592 | swap.flags |= Screen_VisibleCursor; |
601 | } |
593 | } |
602 | else |
594 | else |
603 | #endif |
595 | #endif |
604 | if (options & Opt_secondaryScroll) |
596 | if (options & Opt_secondaryScroll) |
605 | //if (current_screen == PRIMARY) |
|
|
606 | scr_scroll_text (0, prev_nrow - 1, prev_nrow, 0); |
597 | scr_scroll_text (0, prev_nrow - 1, prev_nrow, 0); |
607 | |
598 | |
608 | return scrn; |
599 | return scrn; |
609 | } |
600 | } |
610 | |
601 | |
611 | // clear WrapNext indicator, solidifying position on next line |
602 | // clear WrapNext indicator, solidifying position on next line |
… | |
… | |
2400 | else |
2391 | else |
2401 | font->draw (*TermWin.drawable, xpixel, ypixel, text, count, fore, back); |
2392 | font->draw (*TermWin.drawable, xpixel, ypixel, text, count, fore, back); |
2402 | |
2393 | |
2403 | if (rend & RS_Uline && font->descent > 1 && fore != back) |
2394 | if (rend & RS_Uline && font->descent > 1 && fore != back) |
2404 | { |
2395 | { |
|
|
2396 | #if ENABLE_FRILLS |
|
|
2397 | if (ISSET_PIXCOLOR (Color_underline)) |
|
|
2398 | XSetForeground (display->display, TermWin.gc, pix_colors[Color_underline]); |
|
|
2399 | else |
|
|
2400 | #endif |
2405 | XSetForeground (display->display, TermWin.gc, pix_colors[fore]); |
2401 | XSetForeground (display->display, TermWin.gc, pix_colors[fore]); |
|
|
2402 | |
2406 | XDrawLine (display->display, drawBuffer, TermWin.gc, |
2403 | XDrawLine (display->display, drawBuffer, TermWin.gc, |
2407 | xpixel, ypixel + font->ascent + 1, |
2404 | xpixel, ypixel + font->ascent + 1, |
2408 | xpixel + Width2Pixel (count) - 1, ypixel + font->ascent + 1); |
2405 | xpixel + Width2Pixel (count) - 1, ypixel + font->ascent + 1); |
2409 | } |
2406 | } |
2410 | } /* for (col....) */ |
2407 | } /* for (col....) */ |
… | |
… | |
2656 | /* ------------------------------------------------------------------------- */ |
2653 | /* ------------------------------------------------------------------------- */ |
2657 | /* |
2654 | /* |
2658 | * Paste a selection direct to the command fd |
2655 | * Paste a selection direct to the command fd |
2659 | */ |
2656 | */ |
2660 | void |
2657 | void |
2661 | rxvt_term::paste (const unsigned char *data, unsigned int len) |
2658 | rxvt_term::paste (unsigned char *data, unsigned int len) |
2662 | { |
2659 | { |
2663 | unsigned int i, j, n; |
|
|
2664 | unsigned char *ds = (unsigned char *)rxvt_malloc (PROP_SIZE); |
|
|
2665 | |
|
|
2666 | /* convert normal newline chars into common keyboard Return key sequence */ |
2660 | /* convert normal newline chars into common keyboard Return key sequence */ |
2667 | for (i = 0; i < len; i += PROP_SIZE) |
2661 | for (unsigned int i = 0; i < len; i++) |
2668 | { |
|
|
2669 | n = min (len - i, PROP_SIZE); |
|
|
2670 | memcpy (ds, data + i, n); |
|
|
2671 | |
|
|
2672 | for (j = 0; j < n; j++) |
|
|
2673 | if (ds[j] == C0_LF) |
2662 | if (data[i] == C0_LF) |
2674 | ds[j] = C0_CR; |
2663 | data[i] = C0_CR; |
2675 | |
2664 | |
2676 | tt_write (ds, (int)n); |
2665 | tt_write (data, len); |
2677 | } |
|
|
2678 | |
|
|
2679 | free (ds); |
|
|
2680 | } |
2666 | } |
2681 | |
2667 | |
2682 | /* ------------------------------------------------------------------------- */ |
2668 | /* ------------------------------------------------------------------------- */ |
2683 | /* |
2669 | /* |
2684 | * Respond to a notification that a primary selection has been sent |
2670 | * Respond to a notification that a primary selection has been sent |
2685 | * EXT: SelectionNotify |
2671 | * EXT: SelectionNotify |
2686 | */ |
2672 | */ |
2687 | int |
2673 | void |
2688 | rxvt_term::selection_paste (Window win, Atom prop, bool delete_prop) |
2674 | rxvt_term::selection_paste (Window win, Atom prop, bool delete_prop) |
2689 | { |
2675 | { |
2690 | long nread = 0; |
|
|
2691 | unsigned long bytes_after; |
|
|
2692 | XTextProperty ct; |
|
|
2693 | |
|
|
2694 | if (prop == None) /* check for failed XConvertSelection */ |
2676 | if (prop == None) /* check for failed XConvertSelection */ |
2695 | { |
2677 | { |
2696 | if ((selection_type & Sel_CompoundText)) |
2678 | if ((selection_type & Sel_CompoundText)) |
2697 | { |
2679 | { |
2698 | int selnum = selection_type & Sel_whereMask; |
2680 | int selnum = selection_type & Sel_whereMask; |
… | |
… | |
2711 | selection_request_other (xa[XA_COMPOUND_TEXT], selnum); |
2693 | selection_request_other (xa[XA_COMPOUND_TEXT], selnum); |
2712 | else |
2694 | else |
2713 | selection_type = 0; |
2695 | selection_type = 0; |
2714 | } |
2696 | } |
2715 | |
2697 | |
2716 | return 0; |
2698 | return; |
2717 | } |
|
|
2718 | |
|
|
2719 | for (;;) |
|
|
2720 | { |
2699 | } |
|
|
2700 | |
|
|
2701 | unsigned long bytes_after; |
|
|
2702 | XTextProperty ct; |
|
|
2703 | |
|
|
2704 | if (XGetWindowProperty (display->display, win, prop, |
|
|
2705 | 0, PROP_SIZE / 4, |
|
|
2706 | delete_prop, AnyPropertyType, |
|
|
2707 | &ct.encoding, &ct.format, |
|
|
2708 | &ct.nitems, &bytes_after, |
|
|
2709 | &ct.value) != Success) |
|
|
2710 | { |
|
|
2711 | ct.value = 0; |
|
|
2712 | goto bailout; |
|
|
2713 | } |
|
|
2714 | |
|
|
2715 | if (ct.encoding == None) |
|
|
2716 | goto bailout; |
|
|
2717 | |
|
|
2718 | if (bytes_after) |
|
|
2719 | { |
|
|
2720 | // fetch and append remaining data |
|
|
2721 | XTextProperty ct2; |
|
|
2722 | |
2721 | if (XGetWindowProperty (display->display, win, prop, (long) (nread / 4), |
2723 | if (XGetWindowProperty (display->display, win, prop, |
2722 | (long) (PROP_SIZE / 4), delete_prop, |
2724 | ct.nitems / 4, (bytes_after + 3) / 4, |
|
|
2725 | delete_prop, AnyPropertyType, |
2723 | AnyPropertyType, &ct.encoding, &ct.format, |
2726 | &ct2.encoding, &ct2.format, |
2724 | &ct.nitems, &bytes_after, |
2727 | &ct2.nitems, &bytes_after, |
2725 | &ct.value) != Success) |
2728 | &ct2.value) != Success) |
2726 | break; |
2729 | goto bailout; |
2727 | |
2730 | |
2728 | if (ct.encoding == 0) |
2731 | // realloc should be compatible to XFree, here, and elsewhere, too |
2729 | break; |
2732 | ct.value = (unsigned char *)realloc (ct.value, ct.nitems + ct2.nitems + 1); |
|
|
2733 | memcpy (ct.value + ct.nitems, ct2.value, ct2.nitems + 1); |
|
|
2734 | ct.nitems += ct2.nitems; |
2730 | |
2735 | |
|
|
2736 | XFree (ct2.value); |
|
|
2737 | } |
|
|
2738 | |
|
|
2739 | if (ct.value == 0) |
|
|
2740 | goto bailout; |
|
|
2741 | |
2731 | if (ct.encoding == xa[XA_INCR]) |
2742 | if (ct.encoding == xa[XA_INCR]) |
2732 | { |
2743 | { |
2733 | // INCR selection, start handshake |
2744 | // INCR selection, start handshake |
|
|
2745 | if (!delete_prop) |
2734 | XDeleteProperty (display->display, win, prop); |
2746 | XDeleteProperty (display->display, win, prop); |
|
|
2747 | |
2735 | selection_wait = Sel_incr; |
2748 | selection_wait = Sel_incr; |
|
|
2749 | incr_buf_fill = 0; |
2736 | incr_ev.start (NOW + 10); |
2750 | incr_ev.start (NOW + 10); |
2737 | break; |
|
|
2738 | } |
|
|
2739 | |
2751 | |
2740 | if (ct.value == NULL) |
2752 | goto bailout; |
2741 | continue; |
2753 | } |
2742 | |
2754 | |
2743 | if (ct.nitems == 0) |
2755 | if (ct.nitems == 0) |
|
|
2756 | { |
|
|
2757 | if (selection_wait == Sel_incr) |
|
|
2758 | { |
|
|
2759 | XFree (ct.value); |
|
|
2760 | |
|
|
2761 | // finally complete, now paste the whole thing |
|
|
2762 | selection_wait = Sel_normal; |
|
|
2763 | ct.value = (unsigned char *)incr_buf; |
|
|
2764 | ct.nitems = incr_buf_fill; |
|
|
2765 | incr_buf = 0; |
|
|
2766 | incr_buf_size = 0; |
|
|
2767 | incr_ev.stop (); |
2744 | { |
2768 | } |
|
|
2769 | else |
|
|
2770 | { |
2745 | if (selection_wait == Sel_normal && nread == 0 |
2771 | if (selection_wait == Sel_normal |
2746 | && (win != display->root || prop != XA_CUT_BUFFER0)) // avoid recursion |
2772 | && (win != display->root || prop != XA_CUT_BUFFER0)) // avoid recursion |
2747 | { |
2773 | { |
2748 | /* |
2774 | /* |
2749 | * pass through again trying CUT_BUFFER0 if we've come from |
2775 | * pass through again trying CUT_BUFFER0 if we've come from |
2750 | * XConvertSelection () but nothing was presented |
2776 | * XConvertSelection () but nothing was presented |
2751 | */ |
2777 | */ |
2752 | selection_paste (display->root, XA_CUT_BUFFER0, False); |
2778 | selection_paste (display->root, XA_CUT_BUFFER0, False); |
2753 | } |
2779 | } |
2754 | |
2780 | |
2755 | nread = -1; /* discount any previous stuff */ |
2781 | goto bailout; |
2756 | break; |
2782 | } |
|
|
2783 | } |
|
|
2784 | else if (selection_wait == Sel_incr) |
|
|
2785 | { |
|
|
2786 | incr_ev.start (NOW + 10); |
|
|
2787 | |
|
|
2788 | while (incr_buf_fill + ct.nitems > incr_buf_size) |
2757 | } |
2789 | { |
|
|
2790 | incr_buf_size = incr_buf_size ? incr_buf_size * 2 : 128*1024; |
|
|
2791 | incr_buf = (char *)realloc (incr_buf, incr_buf_size); |
|
|
2792 | } |
2758 | |
2793 | |
|
|
2794 | memcpy (incr_buf + incr_buf_fill, ct.value, ct.nitems); |
2759 | nread += ct.nitems; |
2795 | incr_buf_fill += ct.nitems; |
2760 | |
2796 | |
|
|
2797 | goto bailout; |
|
|
2798 | } |
|
|
2799 | |
2761 | char **cl; |
2800 | char **cl; |
2762 | int cr; |
2801 | int cr; |
2763 | |
2802 | |
2764 | #if ENABLE_FRILLS |
2803 | #if ENABLE_FRILLS |
2765 | // xlib is horribly broken with respect to UTF8_STRING, and nobody cares to fix it |
2804 | // xlib is horribly broken with respect to UTF8_STRING, and nobody cares to fix it |
2766 | // so recode it manually |
2805 | // so recode it manually |
2767 | if (ct.encoding == xa[XA_UTF8_STRING]) |
2806 | if (ct.encoding == xa[XA_UTF8_STRING]) |
2768 | { |
2807 | { |
2769 | wchar_t *w = rxvt_utf8towcs ((const char *)ct.value, ct.nitems); |
2808 | wchar_t *w = rxvt_utf8towcs ((const char *)ct.value, ct.nitems); |
2770 | char *s = rxvt_wcstombs (w); |
2809 | char *s = rxvt_wcstombs (w); |
2771 | |
2810 | free (w); |
2772 | // TODO: strlen == only the first element will be converted. well... |
2811 | // TODO: strlen == only the first element will be converted. well... |
2773 | paste ((unsigned char *)s, strlen (s)); |
2812 | paste ((unsigned char *)s, strlen (s)); |
2774 | |
|
|
2775 | free (s); |
2813 | free (s); |
2776 | free (w); |
2814 | } |
2777 | } |
|
|
2778 | else |
2815 | else |
2779 | #endif |
2816 | #endif |
2780 | if (XmbTextPropertyToTextList (display->display, &ct, &cl, &cr) >= 0 && cl) |
2817 | if (XmbTextPropertyToTextList (display->display, &ct, &cl, &cr) >= 0 |
2781 | { |
2818 | && cl) |
|
|
2819 | { |
2782 | for (int i = 0; i < cr; i++) |
2820 | for (int i = 0; i < cr; i++) |
2783 | paste ((unsigned char *)cl[i], strlen (cl[i])); |
2821 | paste ((unsigned char *)cl[i], strlen (cl[i])); |
2784 | |
2822 | |
2785 | XFreeStringList (cl); |
2823 | XFreeStringList (cl); |
2786 | } |
2824 | } |
2787 | else |
2825 | else |
2788 | paste (ct.value, ct.nitems); |
2826 | paste (ct.value, ct.nitems); // paste raw |
2789 | |
2827 | |
2790 | if (bytes_after == 0) |
2828 | bailout: |
2791 | break; |
|
|
2792 | |
|
|
2793 | XFree (ct.value); |
|
|
2794 | } |
|
|
2795 | |
|
|
2796 | if (ct.value) |
|
|
2797 | XFree (ct.value); |
2829 | XFree (ct.value); |
2798 | |
2830 | |
2799 | if (selection_wait == Sel_normal) |
2831 | if (selection_wait == Sel_normal) |
2800 | selection_wait = Sel_none; |
2832 | selection_wait = Sel_none; |
2801 | |
|
|
2802 | return (int)nread; |
|
|
2803 | } |
2833 | } |
2804 | |
2834 | |
2805 | void |
2835 | void |
2806 | rxvt_term::incr_cb (time_watcher &w) |
2836 | rxvt_term::incr_cb (time_watcher &w) |
2807 | { |
2837 | { |
2808 | selection_wait = Sel_none; |
2838 | selection_wait = Sel_none; |
2809 | |
2839 | |
|
|
2840 | incr_buf_size = 0; |
|
|
2841 | free (incr_buf); |
|
|
2842 | |
2810 | rxvt_warn ("data loss: timeout on INCR selection paste, ignoring.\n"); |
2843 | rxvt_warn ("data loss: timeout on INCR selection paste, ignoring.\n"); |
2811 | } |
2844 | } |
2812 | |
2845 | |
2813 | /* |
|
|
2814 | * INCR support originally provided by Paul Sheer <psheer@obsidian.co.za> |
|
|
2815 | */ |
|
|
2816 | void |
2846 | void |
2817 | rxvt_term::selection_property (Window win, Atom prop) |
2847 | rxvt_term::selection_property (Window win, Atom prop) |
2818 | { |
2848 | { |
2819 | if (prop == None || selection_wait != Sel_incr) |
2849 | if (prop == None || selection_wait != Sel_incr) |
2820 | return; |
2850 | return; |
2821 | |
2851 | |
2822 | if (selection_paste (win, prop, 1) > 0) |
2852 | selection_paste (win, prop, true); |
2823 | incr_ev.start (NOW + 10); |
|
|
2824 | else |
|
|
2825 | { |
|
|
2826 | selection_wait = Sel_none; |
|
|
2827 | incr_ev.stop (); |
|
|
2828 | } |
|
|
2829 | } |
2853 | } |
2830 | |
2854 | |
2831 | /* ------------------------------------------------------------------------- */ |
2855 | /* ------------------------------------------------------------------------- */ |
2832 | /* |
2856 | /* |
2833 | * Request the current selection: |
2857 | * Request the current selection: |
… | |
… | |
2870 | return; |
2894 | return; |
2871 | #endif |
2895 | #endif |
2872 | } |
2896 | } |
2873 | } |
2897 | } |
2874 | |
2898 | |
2875 | selection_wait = Sel_none; /* don't loop in rxvt_selection_paste () */ |
2899 | selection_wait = Sel_none; /* don't loop in selection_paste () */ |
2876 | selection_paste (display->root, XA_CUT_BUFFER0, False); |
2900 | selection_paste (display->root, XA_CUT_BUFFER0, false); |
2877 | } |
2901 | } |
2878 | |
2902 | |
2879 | int |
2903 | int |
2880 | rxvt_term::selection_request_other (Atom target, int selnum) |
2904 | rxvt_term::selection_request_other (Atom target, int selnum) |
2881 | { |
2905 | { |
… | |
… | |
3385 | selection_delimit_word (DN, &selection.end, &selection.end); |
3409 | selection_delimit_word (DN, &selection.end, &selection.end); |
3386 | } |
3410 | } |
3387 | else if (selection.clicks == 3) |
3411 | else if (selection.clicks == 3) |
3388 | { |
3412 | { |
3389 | #if ENABLE_FRILLS |
3413 | #if ENABLE_FRILLS |
3390 | if ((options & Opt_tripleclickwords)) |
3414 | if (options & Opt_tripleclickwords) |
3391 | { |
3415 | { |
3392 | int end_row; |
3416 | int end_row; |
3393 | |
3417 | |
3394 | selection_delimit_word (UP, &selection.beg, &selection.beg); |
3418 | selection_delimit_word (UP, &selection.beg, &selection.beg); |
3395 | end_row = screen.tlen[selection.mark.row + TermWin.saveLines]; |
3419 | end_row = screen.tlen[selection.mark.row + TermWin.saveLines]; |
… | |
… | |
3413 | if (ROWCOL_IS_AFTER (selection.mark, selection.beg)) |
3437 | if (ROWCOL_IS_AFTER (selection.mark, selection.beg)) |
3414 | selection.mark.col++; |
3438 | selection.mark.col++; |
3415 | |
3439 | |
3416 | selection.beg.col = 0; |
3440 | selection.beg.col = 0; |
3417 | selection.end.col = ncol; |
3441 | selection.end.col = ncol; |
|
|
3442 | |
|
|
3443 | // select a complete logical line |
|
|
3444 | while (selection.beg.row > -TermWin.saveLines |
|
|
3445 | && screen.tlen[selection.beg.row - 1 + TermWin.saveLines] == -1) |
|
|
3446 | selection.beg.row--; |
|
|
3447 | |
|
|
3448 | while (selection.end.row < TermWin.nrow |
|
|
3449 | && screen.tlen[selection.end.row + TermWin.saveLines] == -1) |
|
|
3450 | selection.end.row++; |
3418 | } |
3451 | } |
3419 | } |
3452 | } |
3420 | |
3453 | |
3421 | if (button3 && buttonpress) |
3454 | if (button3 && buttonpress) |
3422 | { /* mark may need to be changed */ |
3455 | { /* mark may need to be changed */ |