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

Comparing rxvt-unicode/src/screen.C (file contents):
Revision 1.403 by sf-exg, Tue Nov 15 19:54:30 2011 UTC vs.
Revision 1.404 by sf-exg, Tue Nov 15 20:07:10 2011 UTC

49 if (option (Opt_scrollTtyOutput)) \ 49 if (option (Opt_scrollTtyOutput)) \
50 view_start = 0 50 view_start = 0
51#define CLEAR_SELECTION() \ 51#define CLEAR_SELECTION() \
52 selection.beg.row = selection.beg.col \ 52 selection.beg.row = selection.beg.col \
53 = selection.end.row = selection.end.col = 0 53 = selection.end.row = selection.end.col = 0
54#define CLEAR_ALL_SELECTION() \ 54#define CLEAR_SELECTION_MARK() \
55 selection.beg.row = selection.beg.col \
56 = selection.mark.row = selection.mark.col \
57 = selection.end.row = selection.end.col = 0 55 selection.mark.row = selection.mark.col = 0
58 56
59#define ROW_AND_COL_IS_AFTER(A, B, C, D) \ 57#define ROW_AND_COL_IS_AFTER(A, B, C, D) \
60 (((A) > (C)) || (((A) == (C)) && ((B) > (D)))) 58 (((A) > (C)) || (((A) == (C)) && ((B) > (D))))
61#define ROW_AND_COL_IS_BEFORE(A, B, C, D) \ 59#define ROW_AND_COL_IS_BEFORE(A, B, C, D) \
62 (((A) < (C)) || (((A) == (C)) && ((B) < (D)))) 60 (((A) < (C)) || (((A) == (C)) && ((B) < (D))))
405 tabs = (char *)rxvt_malloc (ncol); 403 tabs = (char *)rxvt_malloc (ncol);
406 404
407 for (int col = ncol; col--; ) 405 for (int col = ncol; col--; )
408 tabs [col] = col % TABSIZE == 0; 406 tabs [col] = col % TABSIZE == 0;
409 407
410 CLEAR_ALL_SELECTION (); 408 CLEAR_SELECTION ();
409 CLEAR_SELECTION_MARK ();
411 410
412 prev_nrow = nrow; 411 prev_nrow = nrow;
413 prev_ncol = ncol; 412 prev_ncol = ncol;
414 413
415 tt_winch (); 414 tt_winch ();
712 || (selection.beg.row - count < row1 && selection.beg.row >= row1) 711 || (selection.beg.row - count < row1 && selection.beg.row >= row1)
713 || (selection.beg.row - count > row2 && selection.beg.row <= row2) 712 || (selection.beg.row - count > row2 && selection.beg.row <= row2)
714 || (selection.end.row - count < row1 && selection.end.row >= row1) 713 || (selection.end.row - count < row1 && selection.end.row >= row1)
715 || (selection.end.row - count > row2 && selection.end.row <= row2)) 714 || (selection.end.row - count > row2 && selection.end.row <= row2))
716 { 715 {
717 CLEAR_ALL_SELECTION (); 716 CLEAR_SELECTION ();
718 selection.op = SELECTION_CLEAR; 717 if (!IN_RANGE_EXC (selection.mark.row, top_row, nrow))
718 CLEAR_SELECTION_MARK ();
719 } 719 }
720 else if (selection.end.row >= row1 && selection.end.row <= row2) 720 else if (selection.end.row >= row1 && selection.end.row <= row2)
721 { 721 {
722 /* move selected region too */ 722 /* move selected region too */
723 selection.beg.row -= count; 723 selection.beg.row -= count;
2042 * A: set up vars 2042 * A: set up vars
2043 */ 2043 */
2044 refresh_count = 0; 2044 refresh_count = 0;
2045 2045
2046 unsigned int old_screen_flags = screen.flags; 2046 unsigned int old_screen_flags = screen.flags;
2047 char have_bg = 0; 2047 bool have_bg = 0;
2048#ifdef HAVE_BG_PIXMAP 2048#ifdef HAVE_BG_PIXMAP
2049 have_bg = bg_pixmap != None; 2049 have_bg = bg_pixmap != None;
2050#endif 2050#endif
2051 ocrow = oldcursor.row; /* is there an old outline cursor on screen? */ 2051 ocrow = oldcursor.row; /* is there an old outline cursor on screen? */
2052 2052
2698 2698
2699 row_col_t pos; 2699 row_col_t pos;
2700 pos.row = pos.col = 0; 2700 pos.row = pos.col = 0;
2701 2701
2702 if (!IN_RANGE_EXC (selection.beg.row, top_row, nrow) 2702 if (!IN_RANGE_EXC (selection.beg.row, top_row, nrow)
2703 || !IN_RANGE_EXC (selection.mark.row, top_row, nrow)
2704 || !IN_RANGE_EXC (selection.end.row, top_row, nrow) 2703 || !IN_RANGE_EXC (selection.end.row, top_row, nrow)
2705 || (check_more == 1 2704 || (check_more == 1
2706 && current_screen == selection.screen 2705 && current_screen == selection.screen
2707 && !ROWCOL_IS_BEFORE (screen.cur, selection.beg) 2706 && !ROWCOL_IS_BEFORE (screen.cur, selection.beg)
2708 && ROWCOL_IS_BEFORE (screen.cur, selection.end)) 2707 && ROWCOL_IS_BEFORE (screen.cur, selection.end))
2709 || (check_more == 2 2708 || (check_more == 2
2710 && ROWCOL_IS_BEFORE (selection.beg, pos) 2709 && ROWCOL_IS_BEFORE (selection.beg, pos)
2711 && ROWCOL_IS_AFTER (selection.end, pos)) 2710 && ROWCOL_IS_AFTER (selection.end, pos))
2712 || (check_more == 3 2711 || (check_more == 3
2713 && ROWCOL_IS_AFTER (selection.end, pos))) 2712 && ROWCOL_IS_AFTER (selection.end, pos)))
2714 CLEAR_ALL_SELECTION (); 2713 CLEAR_SELECTION ();
2714
2715 if (!IN_RANGE_EXC (selection.mark.row, top_row, nrow))
2716 CLEAR_SELECTION_MARK ();
2715} 2717}
2716 2718
2717/* ------------------------------------------------------------------------- */ 2719/* ------------------------------------------------------------------------- */
2718/* 2720/*
2719 * Paste a selection direct to the command fd 2721 * Paste a selection direct to the command fd

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines