mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
add rog's chording fix.
This commit is contained in:
parent
9fdc52c625
commit
aba09191af
1 changed files with 7 additions and 7 deletions
|
@ -862,7 +862,7 @@ textselect(Text *t)
|
|||
{
|
||||
uint q0, q1;
|
||||
int b, x, y;
|
||||
int state;
|
||||
int state, op;
|
||||
|
||||
selecttext = t;
|
||||
/*
|
||||
|
@ -918,12 +918,12 @@ textselect(Text *t)
|
|||
clicktext = nil;
|
||||
textsetselect(t, q0, q1);
|
||||
flushimage(display, 1);
|
||||
state = 0; /* undo when possible; +1 for cut, -1 for paste */
|
||||
state = op = 0; /* undo when possible; +1 for cut, -1 for paste */
|
||||
while(mouse->buttons){
|
||||
mouse->msec = 0;
|
||||
b = mouse->buttons;
|
||||
if(b & 6){
|
||||
if(state==0 && t->what==Body){
|
||||
if(state==0 && op==0 && t->what==Body){
|
||||
seq++;
|
||||
filemark(t->w->body.file);
|
||||
}
|
||||
|
@ -932,18 +932,18 @@ textselect(Text *t)
|
|||
winundo(t->w, TRUE);
|
||||
textsetselect(t, q0, t->q0);
|
||||
state = 0;
|
||||
}else if(state != 1){
|
||||
}else if(state != 1 && op != -1){
|
||||
cut(t, t, nil, TRUE, TRUE, nil, 0);
|
||||
state = 1;
|
||||
op = state = 1;
|
||||
}
|
||||
}else{
|
||||
if(state==1 && t->what==Body){
|
||||
winundo(t->w, TRUE);
|
||||
textsetselect(t, q0, t->q1);
|
||||
state = 0;
|
||||
}else if(state != -1){
|
||||
}else if(state != -1 && op != 1){
|
||||
paste(t, t, nil, TRUE, FALSE, nil, 0);
|
||||
state = -1;
|
||||
op = state = -1;
|
||||
}
|
||||
}
|
||||
textscrdraw(t);
|
||||
|
|
Loading…
Reference in a new issue