about summary refs log tree commit diff stats
path: root/src/ui/statusbar.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-12-02 14:03:53 +0100
committerMichael Vetter <jubalh@iodoru.org>2019-12-02 14:03:53 +0100
commit19de066008c69b24cc3d64a8781089e56d416a53 (patch)
tree882f630a5a5b9c23b501926253afcc1a0330443a /src/ui/statusbar.c
parent09b8802f51db9406c03cd7411bd1aae1f806d2a1 (diff)
downloadprofani-tty-19de066008c69b24cc3d64a8781089e56d416a53.tar.gz
Call ncurses resize function before move function
From @xaizek s comment on issue #1235:
```
If the move would cause the window to be off the screen, it is an error and the window
is not moved.

Resize on the other hand doesn't fail like this according to its documentation. So new size needs to be applied first.
```

Big thanks to @xaizek for taking a look at our code and helping us!!

Regards https://github.com/profanity-im/profanity/issues/1235
Diffstat (limited to 'src/ui/statusbar.c')
-rw-r--r--src/ui/statusbar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ui/statusbar.c b/src/ui/statusbar.c
index 39b1ddbb..8f9900e1 100644
--- a/src/ui/statusbar.c
+++ b/src/ui/statusbar.c
@@ -137,8 +137,8 @@ status_bar_resize(void)
     int cols = getmaxx(stdscr);
     werase(statusbar_win);
     int row = screen_statusbar_row();
-    mvwin(statusbar_win, row, 0);
     wresize(statusbar_win, 1, cols);
+    mvwin(statusbar_win, row, 0);
 
     status_bar_draw();
 }