about summary refs log tree commit diff stats
path: root/src/ui/statusbar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/statusbar.c')
-rw-r--r--src/ui/statusbar.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/ui/statusbar.c b/src/ui/statusbar.c
index 6a1a72e9..9b87ecdc 100644
--- a/src/ui/statusbar.c
+++ b/src/ui/statusbar.c
@@ -89,7 +89,13 @@ create_status_bar(void)
 
     int bracket_attrs = theme_attrs(THEME_STATUS_BRACKET);
 
-    status_bar = newwin(1, cols, rows-2, 0);
+    char *pos = prefs_get_string(PREF_INPUTWIN);
+    if (g_strcmp0(pos, "top") == 0) {
+        status_bar = newwin(1, cols, rows-1, 0);
+    } else {
+        status_bar = newwin(1, cols, rows-2, 0);
+    }
+    prefs_free_string(pos);
     wbkgd(status_bar, theme_attrs(THEME_STATUS_TEXT));
     wattron(status_bar, bracket_attrs);
     mvwprintw(status_bar, 0, cols - 34, _active);
@@ -122,7 +128,13 @@ status_bar_resize(void)
 
     int bracket_attrs = theme_attrs(THEME_STATUS_BRACKET);
 
-    mvwin(status_bar, rows-2, 0);
+    char *pos = prefs_get_string(PREF_INPUTWIN);
+    if (g_strcmp0(pos, "top") == 0) {
+        mvwin(status_bar, rows-1, 0);
+    } else {
+        mvwin(status_bar, rows-2, 0);
+    }
+    prefs_free_string(pos);
     wresize(status_bar, 1, cols);
     wbkgd(status_bar, theme_attrs(THEME_STATUS_TEXT));
     wattron(status_bar, bracket_attrs);