From 2cb82b02fab268f23ce67cee81438a1a0600f20d Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Tue, 26 May 2009 21:35:11 +0200 Subject: [PATCH] Restricted the ^Q in the injection to the control characters. --- selector.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selector.cc b/selector.cc index a6d3d7e..27225b9 100644 --- a/selector.cc +++ b/selector.cc @@ -73,7 +73,7 @@ void inject_into_tty_buffer(char *string) { const char control_q = '\021'; // Put the selected string in the tty input buffer for(const char *k = string; *k; k++) { - if(add_control_qs) { + if(add_control_qs && !(*k >= ' ' && *k <= '~')) { // Add ^Q to quote control characters ioctl(STDIN_FILENO, TIOCSTI, &control_q); } -- 2.39.5