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.219 by root, Mon Jan 9 23:00:07 2006 UTC vs.
Revision 1.226 by root, Thu Jan 12 09:55:44 2006 UTC

572 * Change the colour for following text 572 * Change the colour for following text
573 */ 573 */
574void 574void
575rxvt_term::scr_color (unsigned int color, int fgbg) 575rxvt_term::scr_color (unsigned int color, int fgbg)
576{ 576{
577 if (color > maxTermCOLOR) 577 if (!IN_RANGE_INC (color, minCOLOR, maxTermCOLOR))
578 color = fgbg; 578 color = fgbg;
579 579
580 if (fgbg == Color_fg) 580 if (fgbg == Color_fg)
581 rstyle = SET_FGCOLOR (rstyle, color); 581 rstyle = SET_FGCOLOR (rstyle, color);
582 else 582 else
2381 /* 2381 /*
2382 * H: cleanup selection 2382 * H: cleanup selection
2383 */ 2383 */
2384 scr_reverse_selection (); 2384 scr_reverse_selection ();
2385 2385
2386 if (refresh_type & SMOOTH_REFRESH)
2387 XFlush (display->display);
2388
2389 num_scr = 0; 2386 num_scr = 0;
2390 num_scr_allow = 1; 2387 num_scr_allow = 1;
2391} 2388}
2392 2389
2393void 2390void
2498 row = -view_start; 2495 row = -view_start;
2499 } 2496 }
2500 2497
2501 for (; row < min (end_row, view_end); row++, col = 0) 2498 for (; row < min (end_row, view_end); row++, col = 0)
2502 for (rend_t *srp = ROW(row).r; col < ncol; col++) 2499 for (rend_t *srp = ROW(row).r; col < ncol; col++)
2503 srp[col] ^= RS_RVid; 2500 srp[col] ^= rstyle;
2504 2501
2505 if (row == end_row) 2502 if (row == end_row)
2506 for (rend_t *srp = ROW(row).r; col < end_col; col++) 2503 for (rend_t *srp = ROW(row).r; col < end_col; col++)
2507 srp[col] ^= RS_RVid; 2504 srp[col] ^= rstyle;
2508} 2505}
2509 2506
2510/* ------------------------------------------------------------------------- */ 2507/* ------------------------------------------------------------------------- */
2511void 2508void
2512rxvt_term::scr_reverse_selection () 2509rxvt_term::scr_reverse_selection ()
3024 { 3021 {
3025 display->set_selection_owner (this); 3022 display->set_selection_owner (this);
3026 return true; 3023 return true;
3027 } 3024 }
3028 else 3025 else
3026 {
3027 selection_clear ();
3029 return false; 3028 return false;
3029 }
3030 3030
3031#if 0 3031#if 0
3032 XTextProperty ct; 3032 XTextProperty ct;
3033 3033
3034 if (XwcTextListToTextProperty (display->display, &selection.text, 1, XStringStyle, &ct) >= 0) 3034 if (XwcTextListToTextProperty (display->display, &selection.text, 1, XStringStyle, &ct) >= 0)
3047void 3047void
3048rxvt_term::selection_click (int clicks, int x, int y) 3048rxvt_term::selection_click (int clicks, int x, int y)
3049{ 3049{
3050 clicks = ((clicks - 1) % 3) + 1; 3050 clicks = ((clicks - 1) % 3) + 1;
3051 selection.clicks = clicks; /* save clicks so extend will work */ 3051 selection.clicks = clicks; /* save clicks so extend will work */
3052
3053 if (clicks == 2 && !selection.rect
3054 && HOOK_INVOKE ((this, HOOK_SEL_EXTEND, DT_END)))
3055 {
3056 MEvent.clicks = 1; // what a mess
3057 selection.screen = current_screen;
3058 selection.op = SELECTION_CONT;
3059 return;
3060 }
3052 3061
3053 selection_start_colrow (Pixel2Col (x), Pixel2Row (y)); 3062 selection_start_colrow (Pixel2Col (x), Pixel2Row (y));
3054 3063
3055 if (clicks == 2 || clicks == 3) 3064 if (clicks == 2 || clicks == 3)
3056 selection_extend_colrow (selection.mark.col, 3065 selection_extend_colrow (selection.mark.col,
3352 else if (selection.clicks == 2) 3361 else if (selection.clicks == 2)
3353 { 3362 {
3354 if (ROWCOL_IS_AFTER (selection.end, selection.beg)) 3363 if (ROWCOL_IS_AFTER (selection.end, selection.beg))
3355 selection.end.col--; 3364 selection.end.col--;
3356 3365
3357 if (!HOOK_INVOKE ((this, HOOK_SEL_EXTEND, DT_END)))
3358 {
3359 selection_delimit_word (UP, &selection.beg, &selection.beg); 3366 selection_delimit_word (UP, &selection.beg, &selection.beg);
3360 selection_delimit_word (DN, &selection.end, &selection.end); 3367 selection_delimit_word (DN, &selection.end, &selection.end);
3361 }
3362 } 3368 }
3363 else if (selection.clicks == 3) 3369 else if (selection.clicks == 3)
3364 { 3370 {
3365#if ENABLE_FRILLS 3371#if ENABLE_FRILLS
3366 if (OPTION (Opt_tripleclickwords)) 3372 if (OPTION (Opt_tripleclickwords))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines