undo CL 69070045 / 8539a916d98a

This breaks ^C in win windows, as expected.
People use ^C, win expects and handles ^C,
so I don't think we can just take it away.

I've noticed that it is broken but assumed my ssh
was screwed up.

If you want to make WindowsKey+C,X,V do the
operations, by analogy with command+C,X,V
on Mac, that's fine with me.

««« original CL description
acme: copy/cut/paste with ctl+c,x,v

LGTM=rsc
R=rsc
CC=plan9port.codebot
https://codereview.appspot.com/69070045

»»»

TBR=rsc
CC=burns.ethan, r
https://codereview.appspot.com/96410045
This commit is contained in:
Russ Cox 2014-05-19 09:39:34 -04:00
parent bae34df843
commit 113ea95f7b

View file

@ -745,12 +745,10 @@ texttype(Text *t, Rune r)
q0++; q0++;
textshow(t, q0, q0, TRUE); textshow(t, q0, q0, TRUE);
return; return;
case 3: /* ^C: copy */
case Kcmd+'c': /* %C: copy */ case Kcmd+'c': /* %C: copy */
typecommit(t); typecommit(t);
cut(t, t, nil, TRUE, FALSE, nil, 0); cut(t, t, nil, TRUE, FALSE, nil, 0);
return; return;
case 0x1a: /* ^Z: undo */
case Kcmd+'z': /* %Z: undo */ case Kcmd+'z': /* %Z: undo */
typecommit(t); typecommit(t);
undo(t, nil, nil, TRUE, 0, nil, 0); undo(t, nil, nil, TRUE, 0, nil, 0);
@ -779,7 +777,6 @@ texttype(Text *t, Rune r)
} }
/* cut/paste must be done after the seq++/filemark */ /* cut/paste must be done after the seq++/filemark */
switch(r){ switch(r){
case 0x18: /* ^X: cut */
case Kcmd+'x': /* %X: cut */ case Kcmd+'x': /* %X: cut */
typecommit(t); typecommit(t);
if(t->what == Body){ if(t->what == Body){
@ -790,7 +787,6 @@ texttype(Text *t, Rune r)
textshow(t, t->q0, t->q0, 1); textshow(t, t->q0, t->q0, 1);
t->iq1 = t->q0; t->iq1 = t->q0;
return; return;
case 0x16: /* ^V: paste */
case Kcmd+'v': /* %V: paste */ case Kcmd+'v': /* %V: paste */
typecommit(t); typecommit(t);
if(t->what == Body){ if(t->what == Body){