* history-incremental-search-backward: ctrl-c doesn't interrupt
@ 2001-05-17 6:07 Andrew Pimlott
2001-05-17 15:37 ` PATCH " Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Pimlott @ 2001-05-17 6:07 UTC (permalink / raw)
To: zsh-workers
I'm using 4.0.1-pre-4 as distributed in the Debian "testing"
distribution. Before Debian upgraded to the version 4 betas, I used
^C to cancel incremental history searches. This has stopped
working. Now, in the default emacs editing mode, if I type ^R
followed by a few letters, then press ^C, nothing visible happens.
Actually, it does have some effect, because if I subsequently press
another control character (eg ^A), it cancels and brings me to a new
prompt (leaving the found command on the old prompt), instead of
having its usual effect (in the case of ^A, sending me to the
beginning of the currently found command). ^G cancels the search,
but my fingers are used to ^C.
The documentation indicates that an interrupt signal should cancel
the search, so I assume this is a bug. I'll be grateful if this is
fixed. Let me know if you can use more information.
Thanks to everyone who works on zsh!
Andrew
PS. Please Cc: me on replies.
^ permalink raw reply [flat|nested] 2+ messages in thread
* PATCH Re: history-incremental-search-backward: ctrl-c doesn't interrupt
2001-05-17 6:07 history-incremental-search-backward: ctrl-c doesn't interrupt Andrew Pimlott
@ 2001-05-17 15:37 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2001-05-17 15:37 UTC (permalink / raw)
To: Andrew Pimlott, zsh-workers
On May 17, 2:07am, Andrew Pimlott wrote:
} Subject: history-incremental-search-backward: ctrl-c doesn't interrupt
}
} I'm using 4.0.1-pre-4 as distributed in the Debian "testing"
} distribution. Before Debian upgraded to the version 4 betas, I used
} ^C to cancel incremental history searches. This has stopped
} working.
This has to do with the change we made to hold off on processing a signal
until we're at a "safe" spot in the code, to avoid corrupting memory.
However, any blocking read() from the terminal in ZLE ought to be safe.
diff -u zsh-forge/current/Src/Zle/zle_main.c zsh-4.0/Src/Zle/zle_main.c
--- zsh-forge/current/Src/Zle/zle_main.c Wed Mar 28 08:54:21 2001
+++ zsh-4.0/Src/Zle/zle_main.c Thu May 17 08:33:14 2001
@@ -400,7 +400,10 @@
#endif
}
for (;;) {
+ int q = queue_signal_level();
+ dont_queue_signals();
r = read(SHTTY, &cc, 1);
+ restore_queue_signals(q);
if (r == 1)
break;
if (r == 0) {
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-05-17 15:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-17 6:07 history-incremental-search-backward: ctrl-c doesn't interrupt Andrew Pimlott
2001-05-17 15:37 ` PATCH " Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).