tlets try hold 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 55d360f653add52055c39d7989745bf72d6df27a
(DIR) parent 17cfc1dd5f1cf4a6f6752d4e94e76ccee020006c
(HTM) Author: rsc <devnull@localhost>
Date: Wed, 13 Jul 2005 03:53:17 +0000
lets try hold mode in raw mode
Diffstat:
M src/cmd/9term/9term.c | 26 +++++++++++++++++---------
M src/cmd/9term/rcstart.c | 8 +++++++-
2 files changed, 24 insertions(+), 10 deletions(-)
---
(DIR) diff --git a/src/cmd/9term/9term.c b/src/cmd/9term/9term.c
t@@ -922,6 +922,23 @@ key(Rune r)
return;
}
+ /*
+ * This if used to be below the if(rawon() && t.q0==t.nr),
+ * but let's try putting it here. This will allow ESC-processing
+ * to toggle hold mode even in remote SSH connections.
+ * The drawback is that vi-style processing gets harder.
+ * If you find yourself in some weird readline mode, good
+ * luck getting out without ESC. Let's see who complains.
+ */
+ if(r==ESC){ /* toggle hold */
+ holdon = !holdon;
+ drawhold(holdon);
+ /* replaceintegerproperty("_9WM_HOLD_MODE", 1, 32, holdon); */
+ if(!holdon)
+ consread();
+ return;
+ }
+
if(rawon() && t.q0 == t.nr){
addraw(&r, 1);
consread();
t@@ -939,15 +956,6 @@ key(Rune r)
return;
}
- if(r==ESC){ /* toggle hold */
- holdon = !holdon;
- drawhold(holdon);
- /* replaceintegerproperty("_9WM_HOLD_MODE", 1, 32, holdon); */
- if(!holdon)
- consread();
- return;
- }
-
snarf();
switch(r) {
(DIR) diff --git a/src/cmd/9term/rcstart.c b/src/cmd/9term/rcstart.c
t@@ -52,7 +52,13 @@ rcstart(int argc, char **argv, int *pfd, int *tfd)
exit(3);
sysfatal("getpts: %r\n");
}
- notedisable("sys: window size change");
+ /*
+ * notedisable("sys: window size change");
+ *
+ * Can't disable because will be inherited by other programs
+ * like if you run an xterm from the prompt, and then xterm's
+ * resizes won't get handled right. Sigh.
+ */
pid = fork();
switch(pid){
case 0: