diff options
Diffstat (limited to 'repos/xorg/rxvt-unicode/screen_c_9_30.diff')
| -rw-r--r-- | repos/xorg/rxvt-unicode/screen_c_9_30.diff | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/repos/xorg/rxvt-unicode/screen_c_9_30.diff b/repos/xorg/rxvt-unicode/screen_c_9_30.diff new file mode 100644 index 00000000..6d7c4c2e --- /dev/null +++ b/repos/xorg/rxvt-unicode/screen_c_9_30.diff @@ -0,0 +1,72 @@ +diff --git a/src/screen.C b/src/screen.C +index 51c7b410..8fdfad9d 100644 +--- a/src/screen.C ++++ b/src/screen.C +@@ -293,6 +293,7 @@ rxvt_term::scr_reset () + + int common_col = min (prev_ncol, ncol); + ++ // resize swap_buf, blank drawn_buf + for (int row = min (nrow, prev_nrow); row--; ) + { + scr_blank_screen_mem (drawn_buf [row], DEFAULT_RSTYLE); +@@ -306,6 +307,7 @@ rxvt_term::scr_reset () + int pend = MOD (term_start + top_row , prev_total_rows); + int q = total_rows; // rewrapped row + ++#if ENABLE_FRILLS + if ((rewrap_always || top_row) && !rewrap_never) + { + // Re-wrap lines. This is rather ugly, possibly because I am too dumb +@@ -387,36 +389,35 @@ rxvt_term::scr_reset () + scr_blank_line (*qline, qline->l, ncol - qline->l, DEFAULT_RSTYLE); + } + while (p != pend && q > 0); +- +- term_start = total_rows - nrow; +- top_row = q - term_start; +- +- // make sure all terminal lines exist +- while (top_row > 0) +- scr_blank_screen_mem (ROW (--top_row), DEFAULT_RSTYLE); + } + else ++#endif + { +- // if no scrollback exists (yet), wing, instead of wrap ++ // wing, instead of wrap ++ screen.cur.row += nrow - prev_nrow; + +- for (int row = min (nrow, prev_nrow); row--; ) ++ do + { +- line_t &src = prev_row_buf [MOD (term_start + row, prev_total_rows)]; +- line_t &dst = row_buf [row]; ++ p = MOD (p - 1, prev_total_rows); ++ q--; + +- copy_line (dst, src); ++ copy_line (row_buf [q], prev_row_buf [p]); + } ++ while (p != pend && q > 0); ++ } + +- for (int row = prev_nrow; row < nrow; row++) +- scr_blank_screen_mem (row_buf [row], DEFAULT_RSTYLE); ++ term_start = total_rows - nrow; ++ top_row = q - term_start; + +- term_start = 0; +- } ++ // make sure all terminal lines exist ++ while (top_row > 0) ++ scr_blank_screen_mem (ROW (--top_row), DEFAULT_RSTYLE); + + clamp_it (screen.cur.row, 0, nrow - 1); + clamp_it (screen.cur.col, 0, ncol - 1); + } + ++ // ensure drawn_buf, swap_buf and terminal rows are all initialized + for (int row = nrow; row--; ) + { + if (!ROW (row).valid ()) scr_blank_screen_mem (ROW (row), DEFAULT_RSTYLE);
\ No newline at end of file |