aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/samterm
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/samterm')
-rw-r--r--src/cmd/samterm/main.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/cmd/samterm/main.c b/src/cmd/samterm/main.c
index bf0d9a55..5b645e84 100644
--- a/src/cmd/samterm/main.c
+++ b/src/cmd/samterm/main.c
@@ -494,6 +494,9 @@ flushtyping(int clearesc)
#define PAGEUP Kpgup
#define RIGHTARROW Kright
#define SCROLLKEY Kdown
+#define CUT (Kcmd+'x')
+#define COPY (Kcmd+'c')
+#define PASTE (Kcmd+'v')
int
nontypingkey(int c)
@@ -511,6 +514,8 @@ nontypingkey(int c)
case SCROLLKEY:
return 1;
}
+ if(c >= Kcmd)
+ return 1;
return 0;
}
@@ -673,6 +678,20 @@ type(Flayer *l, int res) /* what a bloody mess this is */
for(l=t->l; l<&t->l[NL]; l++)
if(l->textfn)
flsetselect(l, l->p0, l->p1);
+ switch(c) {
+ case CUT:
+ flushtyping(0);
+ cut(t, t->front, 1, 1);
+ break;
+ case COPY:
+ flushtyping(0);
+ snarf(t, t->front);
+ break;
+ case PASTE:
+ flushtyping(0);
+ paste(t, t->front);
+ break;
+ }
}
}