diff options
author | KatolaZ <katolaz@freaknet.org> | 2019-07-30 12:15:54 +0100 |
---|---|---|
committer | KatolaZ <katolaz@freaknet.org> | 2019-07-30 12:15:54 +0100 |
commit | eebc645dee0d15871d6cc46f156d424cd916b191 (patch) | |
tree | 82bb51d04d05a3cf1b4937e2cefb70cc282e9993 /main.c | |
parent | a99759398841d86928c7ad4d8248f907765cbeb2 (diff) |
yank buffer and initial copy/cut/paste support
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -30,19 +30,13 @@ char *argv0; -void dump_lines(){ - int i; - for (i=0; i<HEIGHT; i++){ - printf("%s\n", screen[i].s); - } -} void cleanup(int s){ if (!silent) printf("\033[;H\033[2J"); else - dump_lines(); + dump_lines(screen, stdout); tcsetattr(0, TCSANOW, &t1); fflush(stdout); exit(0); @@ -125,6 +119,9 @@ void commands(FILE *fc){ case 'C': crop_to_nonblank(); break; + case 'p': + paste(); + break; case 'q': check_modified(fc);/** FALLTHROUGH **/ case 'Q': |