summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-08-05 22:57:01 +0200
committerBoris Faure <billiob@gmail.com>2015-08-05 22:57:01 +0200
commit5c37589e399051dbd4d241721c62b03f23fb93bc (patch)
tree65086475d83769ab083cf42d6ecb79625a93e817 /src
parentc2e1c2c3fa200fecef15234f611bf504d117d6fb (diff)
fix resize when cursor alone on last line
Diffstat (limited to 'src')
-rw-r--r--src/bin/termpty.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/termpty.c b/src/bin/termpty.c
index a273ebb..1845172 100644
--- a/src/bin/termpty.c
+++ b/src/bin/termpty.c
@@ -996,7 +996,8 @@ termpty_resize(Termpty *ty, int new_w, int new_h)
996 for (old_y = old_h -1; old_y >= 0; old_y--) 996 for (old_y = old_h -1; old_y >= 0; old_y--)
997 { 997 {
998 Termcell *cells = &TERMPTY_SCREEN(ty, 0, old_y); 998 Termcell *cells = &TERMPTY_SCREEN(ty, 0, old_y);
999 if (!termpty_line_is_empty(cells, old_w)) 999 if (!termpty_line_is_empty(cells, old_w) &&
1000 ty->cursor_state.cy < old_y)
1000 { 1001 {
1001 effective_old_h = old_y + 1; 1002 effective_old_h = old_y + 1;
1002 break; 1003 break;