From 0aa758cbfb0ec50b3d2eb6024515442882cdf63c Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 19 Sep 2016 23:40:45 +0100 Subject: Add /inputwin top|bottom command closes #853 --- src/ui/statusbar.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/ui/statusbar.c') 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); -- cgit 1.4.1-2-gfad0