projects
/
profile
/
ivi
/
weston-ivi-shell.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b502126
)
Minor improvement of weston-terminal resizing
author
José Bollo
<jb@nonadev.net>
Fri, 13 Sep 2013 09:28:51 +0000
(11:28 +0200)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Fri, 13 Sep 2013 22:42:28 +0000
(15:42 -0700)
clients/terminal.c
patch
|
blob
|
history
diff --git
a/clients/terminal.c
b/clients/terminal.c
index
1c60eba
..
ee2baf0
100644
(file)
--- a/
clients/terminal.c
+++ b/
clients/terminal.c
@@
-762,6
+762,11
@@
terminal_resize_cells(struct terminal *terminal, int width, int height)
if (terminal->height > 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 {
total_rows = terminal->height;
}
@@
-789,6
+794,7
@@
terminal_resize_cells(struct terminal *terminal, int width, int height)
terminal->data = data;
terminal->data_attr = data_attr;
terminal->tab_ruler = tab_ruler;
+ terminal->start = 0;
terminal_init_tabs(terminal);
/* Update the window size */