about summary refs log tree commit diff stats
path: root/src/ui/inputwin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/inputwin.c')
-rw-r--r--src/ui/inputwin.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c
index 29bf04c4..9197485f 100644
--- a/src/ui/inputwin.c
+++ b/src/ui/inputwin.c
@@ -62,6 +62,7 @@
 #include "config/preferences.h"
 #include "config/theme.h"
 #include "ui/ui.h"
+#include "ui/screen.h"
 #include "ui/statusbar.h"
 #include "ui/inputwin.h"
 #include "ui/window.h"
@@ -280,16 +281,9 @@ inp_put_back(void)
 static void
 _inp_win_update_virtual(void)
 {
-    int wrows, wcols;
-    getmaxyx(stdscr, wrows, wcols);
-    char *pos = prefs_get_string(PREF_INPUTWIN);
-    if (g_strcmp0(pos, "top") == 0) {
-        pnoutrefresh(inp_win, 0, pad_start, 0, 0, 0, wcols-2);
-    } else {
-        pnoutrefresh(inp_win, 0, pad_start, wrows-1, 0, wrows-1, wcols-2);
-    }
-    prefs_free_string(pos);
-
+    int wcols = getmaxx(stdscr);
+    int row = screen_inputwin_row();
+    pnoutrefresh(inp_win, 0, pad_start, row, 0, row, wcols-2);
 }
 
 static void