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.318 by root, Tue Nov 4 22:44:09 2008 UTC vs.
Revision 1.325 by root, Wed Nov 5 12:28:15 2008 UTC

278 278
279 if (top_row) 279 if (top_row)
280 { 280 {
281 // Re-wrap lines. This is rather ugly, possibly because I am too dumb 281 // Re-wrap lines. This is rather ugly, possibly because I am too dumb
282 // to come up with a lean and mean algorithm. 282 // to come up with a lean and mean algorithm.
283 // TODO: maybe optimise when width didn't change
283 284
284 row_col_t ocur = screen.cur; 285 row_col_t ocur = screen.cur;
285 ocur.row = MOD (term_start + ocur.row, prev_total_rows); 286 ocur.row = MOD (term_start + ocur.row, prev_total_rows);
286 287
287 do 288 do
434void 435void
435rxvt_term::scr_poweron () 436rxvt_term::scr_poweron ()
436{ 437{
437 scr_release (); 438 scr_release ();
438 prev_nrow = prev_ncol = 0; 439 prev_nrow = prev_ncol = 0;
440 rvideo_mode = false;
439 scr_soft_reset (); 441 scr_soft_reset ();
440 scr_reset (); 442 scr_reset ();
441 443
442 scr_clear (true); 444 scr_clear (true);
443 scr_refresh (); 445 scr_refresh ();
449 /* only affects modes, nothing drastic such as clearing the screen */ 451 /* only affects modes, nothing drastic such as clearing the screen */
450#if ENABLE_OVERLAY 452#if ENABLE_OVERLAY
451 scr_overlay_off (); 453 scr_overlay_off ();
452#endif 454#endif
453 455
454 rvideo_mode = false;
455
456 if (current_screen != PRIMARY) 456 if (current_screen != PRIMARY)
457 scr_swap_screen (); 457 scr_swap_screen ();
458 458
459 free (tabs); 459 free (tabs);
460 tabs = (char *)rxvt_malloc (ncol); 460 tabs = (char *)rxvt_malloc (ncol);
461 461
462 for (int col = ncol; --col; ) 462 for (int col = ncol; --col; )
463 tabs [col] = col % TABSIZE == 0; 463 tabs [col] = col % TABSIZE == 0;
464
465 if (current_screen != PRIMARY)
466 scr_swap_screen ();
467 464
468 scr_scroll_region (0, MAX_ROWS - 1); 465 scr_scroll_region (0, MAX_ROWS - 1);
469 scr_rendition (0, ~RS_None); 466 scr_rendition (0, ~RS_None);
470 scr_insert_mode (0); 467 scr_insert_mode (0);
471} 468}
1344 if (row >= nrow) /* Out Of Bounds */ 1341 if (row >= nrow) /* Out Of Bounds */
1345 return; 1342 return;
1346 1343
1347 min_it (num, nrow - row); 1344 min_it (num, nrow - row);
1348 1345
1349 /*TODO: the xlceararea/xfillrectangle below don't take scroll offste into account, ask mikachu for details */ 1346 // TODO: the code below does not work when view_start != 0
1347 // the workaround is to disable the clear and use a normal refresh
1348 // when view_start != 0. mysterious.
1350 if (rstyle & (RS_RVid | RS_Uline)) 1349 if (rstyle & (RS_RVid | RS_Uline))
1351 ren = (rend_t) ~RS_None; 1350 ren = (rend_t) ~RS_None;
1352 else if (GET_BASEBG (rstyle) == Color_bg) 1351 else if (GET_BASEBG (rstyle) == Color_bg)
1353 { 1352 {
1354 ren = DEFAULT_RSTYLE; 1353 ren = DEFAULT_RSTYLE;
1355 1354
1356 if (mapped) 1355 if (mapped && !view_start)
1357 XClearArea (dpy, vt, 0, 1356 XClearArea (dpy, vt, 0,
1358 Row2Pixel (row), (unsigned int)width, 1357 Row2Pixel (row - view_start), (unsigned int)width,
1359 (unsigned int)Height2Pixel (num), False); 1358 (unsigned int)Height2Pixel (num), False);
1360 } 1359 }
1361 else 1360 else
1362 { 1361 {
1363 ren = rstyle & (RS_fgMask | RS_bgMask); 1362 ren = rstyle & (RS_fgMask | RS_bgMask);
1364 1363
1364 if (mapped && !view_start)
1365 {
1365 gcvalue.foreground = pix_colors[bgcolor_of (rstyle)]; 1366 gcvalue.foreground = pix_colors[bgcolor_of (rstyle)];
1366 XChangeGC (dpy, gc, GCForeground, &gcvalue); 1367 XChangeGC (dpy, gc, GCForeground, &gcvalue);
1367 XFillRectangle (dpy, vt, gc, 1368 XFillRectangle (dpy, vt, gc,
1368 0, Row2Pixel (row), 1369 0, Row2Pixel (row - view_start),
1369 (unsigned int)width, 1370 (unsigned int)width,
1370 (unsigned int)Height2Pixel (num)); 1371 (unsigned int)Height2Pixel (num));
1371 gcvalue.foreground = pix_colors[Color_fg]; 1372 gcvalue.foreground = pix_colors[Color_fg];
1372 XChangeGC (dpy, gc, GCForeground, &gcvalue); 1373 XChangeGC (dpy, gc, GCForeground, &gcvalue);
1374 }
1373 } 1375 }
1374 1376
1375 for (; num--; row++) 1377 for (; num--; row++)
1376 { 1378 {
1377 scr_blank_screen_mem (ROW(row), rstyle); 1379 scr_blank_screen_mem (ROW(row), rstyle);
1380
1381 if (!view_start)
1378 scr_blank_line (drawn_buf [row], 0, ncol, ren); 1382 scr_blank_line (drawn_buf [row], 0, ncol, ren);
1379 } 1383 }
1380} 1384}
1381 1385
1382#if !ENABLE_MINIMAL 1386#if !ENABLE_MINIMAL
1383void 1387void
1536 { 1540 {
1537 line->t[col] = line->t[col + count]; 1541 line->t[col] = line->t[col + count];
1538 line->r[col] = line->r[col + count]; 1542 line->r[col] = line->r[col + count];
1539 } 1543 }
1540 1544
1541 scr_blank_line (*line, ncol - count, count, 1545 scr_blank_line (*line, ncol - count, count, rstyle);
1542 line->r[ncol - 1] & (RS_fgMask | RS_bgMask | RS_baseattrMask));
1543 1546
1544 if (selection.op && current_screen == selection.screen 1547 if (selection.op && current_screen == selection.screen
1545 && ROWCOL_IN_ROW_AT_OR_AFTER (selection.beg, screen.cur)) 1548 && ROWCOL_IN_ROW_AT_OR_AFTER (selection.beg, screen.cur))
1546 { 1549 {
1547 if (selection.end.row != screen.cur.row 1550 if (selection.end.row != screen.cur.row

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines