diff options
author | vimboss <devnull@localhost> | 2007-03-08 12:36:46 +0000 |
---|---|---|
committer | vimboss <devnull@localhost> | 2007-03-08 12:36:46 +0000 |
commit | 210f3709d2db54b76d3345cb95f11b2d092fa01b (patch) | |
tree | df3fb407abe202313010675947361aae58b85b0b /src/ui.c | |
parent | a5406421d65881c8fa04d6d2823f475e7d6ff0fb (diff) | |
download | vim-210f3709d2db54b76d3345cb95f11b2d092fa01b.tar.gz |
Diffstat (limited to 'src/ui.c')
-rw-r--r-- | src/ui.c | 25 |
1 files changed, 15 insertions, 10 deletions
@@ -166,10 +166,17 @@ ui_inchar(buf, maxlen, wtime, tb_change_cnt) } #endif - /* When doing a blocking wait there is no need for CTRL-C to interrupt - * something, don't let it set got_int when it was mapped. */ - if (mapped_ctrl_c && (wtime == -1 || wtime > 100L)) - ctrl_c_interrupts = FALSE; + /* If we are going to wait for some time or block... */ + if (wtime == -1 || wtime > 100L) + { + /* ... allow signals to kill us. */ + (void)vim_handle_signal(SIGNAL_UNBLOCK); + + /* ... there is no need for CTRL-C to interrupt something, don't let + * it set got_int when it was mapped. */ + if (mapped_ctrl_c) + ctrl_c_interrupts = FALSE; + } #ifdef FEAT_GUI if (gui.in_use) @@ -183,16 +190,14 @@ ui_inchar(buf, maxlen, wtime, tb_change_cnt) else # endif { - if (wtime == -1 || wtime > 100L) - /* allow signals to kill us */ - (void)vim_handle_signal(SIGNAL_UNBLOCK); retval = mch_inchar(buf, maxlen, wtime, tb_change_cnt); - if (wtime == -1 || wtime > 100L) - /* block SIGHUP et al. */ - (void)vim_handle_signal(SIGNAL_BLOCK); } #endif + if (wtime == -1 || wtime > 100L) + /* block SIGHUP et al. */ + (void)vim_handle_signal(SIGNAL_BLOCK); + ctrl_c_interrupts = TRUE; #ifdef NO_CONSOLE_INPUT |