… | |
… | |
1110 | void |
1110 | void |
1111 | rxvt_term::flush_cb (time_watcher &w) |
1111 | rxvt_term::flush_cb (time_watcher &w) |
1112 | { |
1112 | { |
1113 | make_current (); |
1113 | make_current (); |
1114 | |
1114 | |
1115 | refresh_limit = 1; |
|
|
1116 | refresh_count = 0; |
1115 | refresh_count = 0; |
1117 | flush (); |
1116 | flush (); |
1118 | } |
1117 | } |
1119 | |
1118 | |
1120 | #ifdef CURSOR_BLINK |
1119 | #ifdef CURSOR_BLINK |
… | |
… | |
1693 | &ev.xbutton.x, &ev.xbutton.y, |
1692 | &ev.xbutton.x, &ev.xbutton.y, |
1694 | &unused_mask); |
1693 | &unused_mask); |
1695 | scr_move_to (scrollbar_position (ev.xbutton.y) - csrO, |
1694 | scr_move_to (scrollbar_position (ev.xbutton.y) - csrO, |
1696 | scrollbar_size ()); |
1695 | scrollbar_size ()); |
1697 | want_refresh = 1; |
1696 | want_refresh = 1; |
1698 | refresh_limit = 0; |
|
|
1699 | scrollbar_show (1); |
1697 | scrollbar_show (1); |
1700 | } |
1698 | } |
1701 | break; |
1699 | break; |
1702 | } |
1700 | } |
1703 | |
1701 | |
… | |
… | |
2291 | if (ch == C0_LF) |
2289 | if (ch == C0_LF) |
2292 | nlines++; |
2290 | nlines++; |
2293 | |
2291 | |
2294 | refresh_count++; |
2292 | refresh_count++; |
2295 | |
2293 | |
2296 | if (!option (Opt_jumpScroll) |
2294 | if (!option (Opt_jumpScroll) || refresh_count >= nrow - 1) |
2297 | || (refresh_count >= refresh_limit * (nrow - 1))) |
|
|
2298 | { |
2295 | { |
2299 | refreshnow = true; |
|
|
2300 | refresh_count = 0; |
2296 | refresh_count = 0; |
|
|
2297 | |
|
|
2298 | if (!option (Opt_skipScroll) || io_manager::now () > NOW + .1) |
|
|
2299 | { |
|
|
2300 | refreshnow = true; |
2301 | ch = NOCHAR; |
2301 | ch = NOCHAR; |
2302 | break; |
2302 | break; |
|
|
2303 | } |
2303 | } |
2304 | } |
2304 | |
2305 | |
2305 | // scr_add_lines only works for nlines <= nrow - 1. |
2306 | // scr_add_lines only works for nlines <= nrow - 1. |
2306 | if (nlines >= nrow - 1) |
2307 | if (nlines >= nrow - 1) |
2307 | { |
2308 | { |
… | |
… | |
2335 | && HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END)))) |
2336 | && HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END)))) |
2336 | scr_add_lines (buf, str - buf, nlines); |
2337 | scr_add_lines (buf, str - buf, nlines); |
2337 | |
2338 | |
2338 | /* |
2339 | /* |
2339 | * If there have been a lot of new lines, then update the screen |
2340 | * If there have been a lot of new lines, then update the screen |
2340 | * What the heck I'll cheat and only refresh less than every page-full. |
2341 | * What the heck we'll cheat and only refresh less than every page-full. |
2341 | * the number of pages between refreshes is refresh_limit, which |
2342 | * if skipScroll is enabled. |
2342 | * is incremented here because we must be doing flat-out scrolling. |
|
|
2343 | */ |
2343 | */ |
2344 | if (refreshnow) |
2344 | if (refreshnow) |
2345 | { |
2345 | { |
2346 | if (option (Opt_jumpScroll) && refresh_limit < REFRESH_PERIOD) |
|
|
2347 | refresh_limit++; |
|
|
2348 | else |
|
|
2349 | { |
|
|
2350 | flag = true; |
2346 | flag = true; |
2351 | //TODO: due to popular request, implement "skipscroll" option here |
|
|
2352 | scr_refresh (); |
2347 | scr_refresh (); |
2353 | want_refresh = 1; |
2348 | want_refresh = 1; |
2354 | } |
|
|
2355 | } |
2349 | } |
2356 | |
2350 | |
2357 | } |
2351 | } |
2358 | else |
2352 | else |
2359 | { |
2353 | { |