diff options
author | Ethan Burns <burns.ethan@gmail.com> | 2014-03-13 18:48:41 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2014-03-13 18:48:41 -0400 |
commit | 4030a6c905c99c48e7ca714fbe17a9b00fbff6fe (patch) | |
tree | c8cebc8f046c6ea5abc2c71ba768d5563b7772ed /src/cmd/acme | |
parent | 219cf22d6863a21a7378fc5481bb05bbb6edd2dc (diff) | |
download | plan9port-4030a6c905c99c48e7ca714fbe17a9b00fbff6fe.tar.gz plan9port-4030a6c905c99c48e7ca714fbe17a9b00fbff6fe.tar.bz2 plan9port-4030a6c905c99c48e7ca714fbe17a9b00fbff6fe.zip |
acme: copy/cut/paste with ctl+c,x,v
LGTM=rsc
R=rsc
CC=plan9port.codebot
https://codereview.appspot.com/69070045
Diffstat (limited to 'src/cmd/acme')
-rw-r--r-- | src/cmd/acme/text.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/acme/text.c b/src/cmd/acme/text.c index 5a491b1e..c055c5e3 100644 --- a/src/cmd/acme/text.c +++ b/src/cmd/acme/text.c @@ -745,10 +745,12 @@ texttype(Text *t, Rune r) q0++; textshow(t, q0, q0, TRUE); return; + case 3: /* ^C: copy */ case Kcmd+'c': /* %C: copy */ typecommit(t); cut(t, t, nil, TRUE, FALSE, nil, 0); return; + case 0x1a: /* ^Z: undo */ case Kcmd+'z': /* %Z: undo */ typecommit(t); undo(t, nil, nil, TRUE, 0, nil, 0); @@ -777,6 +779,7 @@ texttype(Text *t, Rune r) } /* cut/paste must be done after the seq++/filemark */ switch(r){ + case 0x18: /* ^X: cut */ case Kcmd+'x': /* %X: cut */ typecommit(t); if(t->what == Body){ @@ -787,6 +790,7 @@ texttype(Text *t, Rune r) textshow(t, t->q0, t->q0, 1); t->iq1 = t->q0; return; + case 0x16: /* ^V: paste */ case Kcmd+'v': /* %V: paste */ typecommit(t); if(t->what == Body){ |