summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ui.c44
1 files changed, 23 insertions, 21 deletions
diff --git a/ui.c b/ui.c
index 568df8d..172120b 100644
--- a/ui.c
+++ b/ui.c
@@ -325,27 +325,6 @@ static void unmark(void) {
 	statusUpdate();
 }
 
-static void windowShow(struct Window *window) {
-	touchwin(window->pad);
-	windows.other = windows.active;
-	windows.active = window;
-	windows.other->mark = true;
-	unmark();
-}
-
-void uiShowID(size_t id) {
-	windowShow(windowFor(id));
-}
-
-void uiShowNum(size_t num) {
-	struct Window *window = windows.head;
-	for (size_t i = 0; i < num; ++i) {
-		window = window->next;
-		if (!window) return;
-	}
-	windowShow(window);
-}
-
 static int wordWidth(const char *str) {
 	size_t len = strcspn(str, " ");
 	int width = 0;
@@ -462,6 +441,7 @@ static void inputUpdate(void) {
 		NULL
 	);
 	if (self.nick) {
+		// TODO: Check if input is command or action.
 		waddch(input, '<');
 		waddstr(input, self.nick);
 		waddstr(input, "> ");
@@ -476,6 +456,28 @@ static void inputUpdate(void) {
 	wmove(input, y, x);
 }
 
+static void windowShow(struct Window *window) {
+	touchwin(window->pad);
+	windows.other = windows.active;
+	windows.active = window;
+	windows.other->mark = true;
+	inputUpdate();
+	unmark();
+}
+
+void uiShowID(size_t id) {
+	windowShow(windowFor(id));
+}
+
+void uiShowNum(size_t num) {
+	struct Window *window = windows.head;
+	for (size_t i = 0; i < num; ++i) {
+		window = window->next;
+		if (!window) return;
+	}
+	windowShow(window);
+}
+
 static void keyCode(int code) {
 	switch (code) {
 		break; case KEY_RESIZE:; // TODO
an title='2015-08-13 15:38:35 +0200'>2015-08-13ui-tree: use "sane" isgraph()John Keeping 2015-08-13cgit.h: move stdbool.h from ui-shared.hJohn Keeping 2015-08-13cache.c: fix header orderJohn Keeping 2015-08-13configfile.c: don't include system headers directlyJohn Keeping 2015-08-13Remove redundant includesJohn Keeping 2015-08-13Makefile: include Git's config.mak.unameJohn Keeping 2015-08-13tests: allow shell to be overriddenJohn Keeping 2015-08-13redirect: cleanlinessJason A. Donenfeld 2015-08-13redirect: be more careful for different cgi setupsJason A. Donenfeld 2015-08-12ui-log: fix double countingJohn Keeping 2015-08-12log: allow users to follow a fileJohn Keeping 2015-08-12shared: make cgit_diff_tree_cb publicJohn Keeping 2015-08-12t0110: Chain together using &&Jason A. Donenfeld 2015-08-12about: always ensure page has a trailing slashJason A. Donenfeld 2015-08-12filters: apply HTML escapingLazaros Koromilas 2015-08-12git: update to v2.5.0Christian Hesse 2015-08-12Fix processing of repo.hide and repo.ignoreDaniel Reichelt