try to handle DEL better
This commit is contained in:
parent
dc305d0368
commit
8d9f61e1c9
1 changed files with 20 additions and 21 deletions
|
|
@ -913,18 +913,7 @@ key(Rune r)
|
||||||
paste(t.snarf, t.nsnarf, 0);
|
paste(t.snarf, t.nsnarf, 0);
|
||||||
if(scrolling)
|
if(scrolling)
|
||||||
show(t.q0);
|
show(t.q0);
|
||||||
return;
|
consread();
|
||||||
}
|
|
||||||
|
|
||||||
switch(r) {
|
|
||||||
/* case 0x03: can't do this because ^C is COPY */
|
|
||||||
case 0x7F: /* DEL: send interrupt */
|
|
||||||
paste(&r, 1, 1);
|
|
||||||
t.qh = t.q0 = t.q1 = t.nr;
|
|
||||||
show(t.q0);
|
|
||||||
/* must write the interrupt character in case app is in raw mode (e.g., ssh) */
|
|
||||||
write(rcfd, "\x7F", 1);
|
|
||||||
// postnote(PNGROUP, rcpid, "interrupt");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -934,13 +923,23 @@ key(Rune r)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(r==ESC || (holdon && r==0x7F)){ /* toggle hold */
|
if(r == 0x7F){ /* DEL: send interrupt; what a mess */
|
||||||
|
if(holdon){
|
||||||
|
holdon = 0;
|
||||||
|
drawhold(holdon);
|
||||||
|
}
|
||||||
|
t.qh = t.q0 = t.q1 = t.nr;
|
||||||
|
show(t.q0);
|
||||||
|
write(rcfd, "\x7F", 1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(r==ESC){ /* toggle hold */
|
||||||
holdon = !holdon;
|
holdon = !holdon;
|
||||||
drawhold(holdon);
|
drawhold(holdon);
|
||||||
// replaceintegerproperty("_9WM_HOLD_MODE", 1, 32, holdon);
|
/* replaceintegerproperty("_9WM_HOLD_MODE", 1, 32, holdon); */
|
||||||
if(!holdon)
|
if(!holdon)
|
||||||
consread();
|
consread();
|
||||||
if(r==ESC)
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue