diff options
author | Dave Presotto <presotto@gmail.com> | 2017-01-08 14:19:34 -0800 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2017-01-09 15:42:59 +0000 |
commit | be7485e1da7966eab4388991e26110570176c744 (patch) | |
tree | d87d2e3563468cfb269437bd79d43b073bc0be30 /src/cmd/9term/9term.c | |
parent | 82112d0434ede36c05d51840c117aca282156e9a (diff) | |
download | plan9port-be7485e1da7966eab4388991e26110570176c744.tar.gz plan9port-be7485e1da7966eab4388991e26110570176c744.tar.bz2 plan9port-be7485e1da7966eab4388991e26110570176c744.zip |
cmd/9term: A hack because I'm constantly getting confused about ^C vs fn+delete
Since Google (and a lot of the outside) is so engrained with using
^C as interrupt, I'd like to be able to use it in 9term if I've
stty'd my intr to ^C. Without this, hitting ^C still works but if
the program behind the window isn't reading from /dev/cons, it won't
take effect till after I hit a newline which is often very confusing.
I know this is a hack since it only works if I stty intr ^C but that
seems the only other character that gets used anyways.
Change-Id: I0597e63b2d7628f5668c648e6dba6f281e4b27fd
Reviewed-on: https://plan9port-review.googlesource.com/2742
Reviewed-by: Russ Cox <rsc@swtch.com>
Diffstat (limited to 'src/cmd/9term/9term.c')
-rw-r--r-- | src/cmd/9term/9term.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/9term/9term.c b/src/cmd/9term/9term.c index 5cf46dec..192a9bcf 100644 --- a/src/cmd/9term/9term.c +++ b/src/cmd/9term/9term.c @@ -448,6 +448,11 @@ winterrupt(Window *w) write(rcfd, rubout, 1); } +int +intrc() { + return getintr(sfd); +} + /* * Process in-band messages about window title changes. * The messages are of the form: |