repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: 3eb283d943d0f6e483d03acc30cee006b94a70e6: path_to: revision_to:
commit 3eb283d943d0f6e483d03acc30cee006b94a70e6 Author: Emanuele GiaquintaDate: Fri Jul 8 20:54:31 2011 +0000 Use rxvt_temp_buf to allocate the temporary line objects needed in scr_scroll_text rather than allocating more space in row_buf. diff --git a/src/rxvt.h b/src/rxvt.h
--- a/src/rxvt.h +++ b/src/rxvt.h @@ -983,7 +983,7 @@ struct rxvt_vars : TermWin_t XSizeHints szHint; rxvt_color *pix_colors; Cursor TermWin_cursor; /* cursor for vt window */ - line_t *row_buf; // all lines, scrollback + terminal, circular, followed by temp_buf + line_t *row_buf; // all lines, scrollback + terminal, circular line_t *drawn_buf; // text on screen line_t *swap_buf; // lines for swap buffer char *tabs; /* per location: 1 == tab-stop */ diff --git a/src/screen.C b/src/screen.C
--- a/src/screen.C
+++ b/src/screen.C
@@ -205,7 +205,7 @@ rxvt_term::scr_reset ()
talloc = new rxvt_salloc (ncol * sizeof (text_t));
ralloc = new rxvt_salloc (ncol * sizeof (rend_t));
- row_buf = (line_t *)rxvt_calloc (total_rows + nrow, sizeof (line_t));
+ row_buf = (line_t *)rxvt_calloc (total_rows , sizeof (line_t));
drawn_buf = (line_t *)rxvt_calloc (nrow , sizeof (line_t));
swap_buf = (line_t *)rxvt_calloc (nrow , sizeof (line_t));
@@ -277,7 +277,7 @@ rxvt_term::scr_reset ()
}
line_t *old_buf = row_buf;
- row_buf = (line_t *)rxvt_calloc (total_rows + nrow, sizeof (line_t));
+ row_buf = (line_t *)rxvt_calloc (total_rows, sizeof (line_t));
int p = MOD (term_start + prev_nrow, prev_total_rows); // previous row
int pend = MOD (term_start + top_row , prev_total_rows);
@@ -748,7 +748,7 @@ rxvt_term::scr_scroll_text (int row1, int row2, int count) NOTHROW
min_it (count, rows);
- line_t *temp_buf = row_buf + total_rows;
+ line_t *temp_buf = rxvt_temp_buf (rows);
for (int row = 0; row < rows; row++)
{
-----END OF PAGE-----