treesummaryrefslogcommitdiff
path: root/main3.c
diff options
context:
space:
mode:
Diffstat (limited to 'main3.c')
-rw-r--r--main3.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/main3.c b/main3.c
index bec0d5c..7929e67 100644
--- a/main3.c
+++ b/main3.c
@@ -85,7 +85,7 @@ void vt100Escape(const char * str, ...) {
void vt100ClearScreen() { vt100Escape("[2J"); }
void vt100CursorHome() { vt100Escape("[H"); }
-void vt100CursorPos(int v, int h) { vt100Escape("[%d;%dH", v, h); }
+void vt100CursorPos(int v, int h) { vt100Escape("[%d;%df", v, h); }
void vt100SaveCursor() { vt100Escape("7"); }
void vt100RestoreCursor() { vt100Escape("8"); }
void vt100EnableAlternateBuffer() { vt100Escape("[?1049h"); }
@@ -404,13 +404,13 @@ void DrawInfo(InputAction actions[NK_COUNT][IN_COUNT], NodeKind nk, InputMode mo
int line = 2;
- vt100CursorPos(line++, h-30);
+ vt100CursorPos(line++, h-10);
printf("%s:%s", NK_STRINGS[nk], (mode == IM_Normal ? "" : " (editing)"));
for (int i = IN_L+1; i < IN_COUNT; i++) {
InputAction action = actions[nk][i];
if (action != IA_None) {
- vt100CursorPos(line++, h-30);
+ vt100CursorPos(line++, h-10);
printf("%s %s", IN_STRINGS[i], IA_STRINGS[action]);
}
}
@@ -585,6 +585,7 @@ int main() {
vt100ShowCursor();
NodeDraw(n);
+ printf("\n");
return 0;
}