thold mode in raw mode - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 6cc5b304facd0beb15df33baf5f1dacfcdb4bba1
(DIR) parent fcb69ec5d8b66cfc0b1a2127555fb1c34b2959e8
(HTM) Author: rsc <devnull@localhost>
Date: Thu, 14 Jul 2005 00:20:41 +0000
hold mode in raw mode
Diffstat:
M src/cmd/9term/9term.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/src/cmd/9term/9term.c b/src/cmd/9term/9term.c
t@@ -939,7 +939,7 @@ key(Rune r)
return;
}
- if(rawon() && t.q0 == t.nr){
+ if(!holdon && rawon() && t.q0 == t.nr){
addraw(&r, 1);
consread();
return;
t@@ -1026,7 +1026,7 @@ consready(void)
return 0;
if(rawon())
- return t.nraw != 0;
+ return t.nraw != 0 || t.qh < t.nr;
/* look to see if there is a complete line */
for(i=t.qh; i<t.nr; i++){
t@@ -1372,7 +1372,7 @@ paste(Rune *r, int n, int advance)
{
Rune *rbuf;
- if(rawon() && t.q0==t.nr){
+ if(!holdon && rawon() && t.q0==t.nr){
addraw(r, n);
consread();
return;