ref: 2b9aae195fc6e3fbcb599045d41d867302132aa3
parent: 57d149779c73492e3e5d879ea00cc52c3913bcf0
author: cancel <cancel@cancel.fm>
date: Sun Dec 2 12:30:47 EST 2018
Add basic editing to tui
--- a/tui_main.c
+++ b/tui_main.c
@@ -1,6 +1,7 @@
#include "bank.h"
#include "base.h"
#include "field.h"
+#include "gbuffer.h"
#include "mark.h"
#include "sim.h"
#include <getopt.h>
@@ -382,6 +383,11 @@
tick_num, &bank);
++tick_num;
break;
+ }
+
+ if (key >= '!' && key <= '~') {
+ gbuffer_poke(field.buffer, field.height, field.width, tui_cursor.y,
+ tui_cursor.x, (char)key);
}
// ncurses gives us the special value KEY_RESIZE if the user didn't