aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-06-02 15:43:18 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-06-02 15:43:18 -0700
commitf8e3e853aa1b4bd0de2b2fdec4fef26291ecdbeb (patch)
tree47f5f74af8842052d98610d38a9af7999c59a0c1 /reader.cpp
parentb7ba2529658e128bfd4b5aacb7702a13c6a9d820 (diff)
Fix to disable VDSUSP, which allows control-Y to serve as yank on OS X
Diffstat (limited to 'reader.cpp')
-rw-r--r--reader.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/reader.cpp b/reader.cpp
index 2ec48804..bc6b5123 100644
--- a/reader.cpp
+++ b/reader.cpp
@@ -672,6 +672,13 @@ void reader_init()
shell_modes.c_cc[VMIN]=1;
shell_modes.c_cc[VTIME]=0;
+ // PCA disable VDSUSP (typically control-Y), which is a funny job control
+ // function available only on OS X and BSD systems
+ // This lets us use control-Y for yank instead
+ #ifdef VDSUSP
+ shell_modes.c_cc[VDSUSP] = _POSIX_VDISABLE;
+ #endif
+
/* Repaint if necessary before each byte is read. This lets us react immediately to universal variable color changes. */
input_common_set_poll_callback(reader_repaint_if_needed);
}