Minor improvement of weston-terminal resizing

dev
José Bollo 11 years ago committed by Kristian Høgsberg
parent b502126e19
commit 4a4704a7d0
  1. 6
      clients/terminal.c

@ -762,6 +762,11 @@ terminal_resize_cells(struct terminal *terminal, int width, int height)
if (terminal->height > height) { if (terminal->height > height) {
total_rows = height; total_rows = height;
i = 1 + terminal->row - height;
if (i > 0) {
terminal->start = (terminal->start + i) % terminal->height;
terminal->row = terminal->row - i;
}
} else { } else {
total_rows = terminal->height; total_rows = terminal->height;
} }
@ -789,6 +794,7 @@ terminal_resize_cells(struct terminal *terminal, int width, int height)
terminal->data = data; terminal->data = data;
terminal->data_attr = data_attr; terminal->data_attr = data_attr;
terminal->tab_ruler = tab_ruler; terminal->tab_ruler = tab_ruler;
terminal->start = 0;
terminal_init_tabs(terminal); terminal_init_tabs(terminal);
/* Update the window size */ /* Update the window size */

Loading…
Cancel
Save