summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3255378)
raw | patch | inline | side by side (parent: 3255378)
author | Jonas Fonseca <fonseca@diku.dk> | |
Sun, 17 Sep 2006 22:56:33 +0000 (00:56 +0200) | ||
committer | Jonas Fonseca <fonseca@antimatter.localdomain> | |
Sun, 17 Sep 2006 22:56:33 +0000 (00:56 +0200) |
tig.c | patch | blob | history |
index 3397489437fca65c549f4563e9af224f04a30a47..7511353c8e3fb3ed70ac3194c29b2070015ad64c 100644 (file)
--- a/tig.c
+++ b/tig.c
static struct view *display[2];
static unsigned int current_view;
+/* Reading from the prompt? */
+static bool input_mode = FALSE;
+
#define foreach_displayed_view(view, i) \
for (i = 0; i < ARRAY_SIZE(display) && (view = display[i]); i++)
}
redrawwin(view->win);
- wrefresh(view->win);
+ if (input_mode)
+ wnoutrefresh(view->win);
+ else
+ wrefresh(view->win);
}
static void
werase(view->title);
mvwaddnstr(view->title, 0, 0, buf, bufpos);
wmove(view->title, 0, view->width - 1);
- wrefresh(view->title);
+
+ if (input_mode)
+ wnoutrefresh(view->title);
+ else
+ wrefresh(view->title);
}
static void
static bool empty = TRUE;
struct view *view = display[current_view];
+ if (input_mode)
+ return;
+
if (!empty || *msg) {
va_list args;
struct view *view;
int i, key;
+ input_mode = TRUE;
+
foreach_view (view, i)
update_view(view);
- report("%s%.*s", prompt, pos, buf);
+ input_mode = FALSE;
+
+ mvwprintw(status_win, 0, 0, "%s%.*s", prompt, pos, buf);
+ wclrtoeol(status_win);
+
/* Refresh, accept single keystroke of input */
key = wgetch(status_win);
switch (key) {