summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ui.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ui.c b/ui.c
index fbbaae2..e634db5 100644
--- a/ui.c
+++ b/ui.c
@@ -130,6 +130,8 @@ static int logHeight(void) {
 	return LINES - 2;
 }
 
+static int _;
+
 void uiDraw(void) {
 	if (ui.hide) return;
 	wnoutrefresh(ui.status);
@@ -139,7 +141,7 @@ void uiDraw(void) {
 		1, 0,
 		lastLine() - 1, lastCol()
 	);
-	int _, x;
+	int x;
 	getyx(ui.input, _, x);
 	pnoutrefresh(
 		ui.input,
@@ -201,7 +203,7 @@ static int addWrap(WINDOW *win, const wchar_t *str) {
 		size_t word = 1 + wcscspn(&format.str[1], L" ");
 		if (word < format.len) format.len = word;
 
-		int _, x, xMax;
+		int x, xMax;
 		getyx(win, _, x);
 		getmaxyx(win, _, xMax);
 		if (xMax - x - 1 < printWidth(format.str, word)) {
@@ -548,7 +550,7 @@ void uiPrompt(void) {
 	if (prompt) addWrap(ui.input, prompt);
 	free(prompt);
 
-	int _, x = 0;
+	int x = 0;
 	struct Format format = { .str = input };
 	formatReset(&format);
 	while (formatParse(&format, editTail())) {
/a>June McEnroe 2017-09-02Remove Scala highlightingJune McEnroe 2017-08-31Fix Linux console Tarmak 3June McEnroe 2017-08-31Use Tarmak 3 on Linux consoleJune McEnroe 2017-08-25Install ddateJune McEnroe 2017-08-19Move nethack options to envJune McEnroe 2017-08-17Remove scala syntax fileJune McEnroe 2017-08-06Add wakeJune McEnroe 2017-08-04Use $() in install.shJune McEnroe 2017-08-02Create Code Tarmak 3 layoutJune McEnroe 2017-07-31Add tupJune McEnroe 2017-07-31Use designated initializer for hnel tableJune McEnroe 2017-07-30Add juneJune McEnroe 2017-07-30Play nethack as ValkyrieJune McEnroe 2017-07-28Add toggle to hnelJune McEnroe 2017-07-28Install slJune McEnroe 2017-07-25Add up, supJune McEnroe 2017-07-24Autopickup ringsJune McEnroe 2017-07-24Name dogJune McEnroe 2017-07-23Add nethackrcJune McEnroe 2017-07-23Remove useless setuid in briJune McEnroe 2017-07-23Clean up hnel a tiny bitJune McEnroe 2017-07-21Set window size in hnelJune McEnroe 2017-07-21Add hnelJune McEnroe 2017-07-19chmod 600 in dtchJune McEnroe