aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/samterm
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2009-04-30 07:29:24 -0700
committerRuss Cox <rsc@swtch.com>2009-04-30 07:29:24 -0700
commit4aad1a325813fa6eed5d29d5dd31f18eae1f006d (patch)
tree88f3fa2a127b7d81257617be1c9620cf05d2f4fd /src/cmd/samterm
parentfe73bf9fadcda23df685e3e72297bd9878e9426d (diff)
parentfe73bf9fadcda23df685e3e72297bd9878e9426d (diff)
downloadplan9port-4aad1a325813fa6eed5d29d5dd31f18eae1f006d.tar.gz
plan9port-4aad1a325813fa6eed5d29d5dd31f18eae1f006d.tar.bz2
plan9port-4aad1a325813fa6eed5d29d5dd31f18eae1f006d.zip
merge
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;
+ }
}
}