Browse Source

Add basic editing to tui

master
cancel 7 years ago
parent
commit
2b9aae195f
  1. 6
      tui_main.c

6
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>
@ -384,6 +385,11 @@ int main(int argc, char** argv) {
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
// actually type anything, but the terminal resized.
// bool ignored_input = ch < CHAR_MIN || ch > CHAR_MAX || ch == KEY_RESIZE;

Loading…
Cancel
Save