summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2019-07-30 12:15:54 +0100
committerKatolaZ <katolaz@freaknet.org>2019-07-30 12:15:54 +0100
commiteebc645dee0d15871d6cc46f156d424cd916b191 (patch)
tree82bb51d04d05a3cf1b4937e2cefb70cc282e9993 /main.c
parenta99759398841d86928c7ad4d8248f907765cbeb2 (diff)
yank buffer and initial copy/cut/paste support
Diffstat (limited to 'main.c')
-rw-r--r--main.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/main.c b/main.c
index 195d8af..d2d5a55 100644
--- a/main.c
+++ b/main.c
@@ -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':