4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Pressing CTRL-\ three times causes Vim to quit. (Ranganath Rao).
12 Also for f CTRL-\ CTRL-\.
13 Solution: When going to cooked mode in mch_delay() set a flag to ignore
18 *** ../vim-7.1.244/src/os_unix.c Sun Jan 13 16:30:23 2008
19 --- src/os_unix.c Sun Feb 10 22:07:27 2008
23 static int show_shell_mess = TRUE;
25 static int deadly_signal = 0; /* The signal we caught */
26 + static int in_mch_delay = FALSE; /* sleeping in mch_delay() */
28 static int curr_tmode = TMODE_COOK; /* contains current terminal mode */
34 /* Go to cooked mode without echo, to allow SIGINT interrupting us
36 old_tmode = curr_tmode;
37 if (curr_tmode == TMODE_RAW)
38 settmode(TMODE_SLEEP);
42 /* Go to cooked mode without echo, to allow SIGINT interrupting us
43 ! * here. But we don't want QUIT to kill us (CTRL-\ used in a
44 ! * shell may produce SIGQUIT). */
45 ! in_mch_delay = TRUE;
46 old_tmode = curr_tmode;
47 if (curr_tmode == TMODE_RAW)
48 settmode(TMODE_SLEEP);
55 + in_mch_delay = FALSE;
66 + /* While in mch_delay() we go to cooked mode to allow a CTRL-C to
67 + * interrupt us. But in cooked mode we may also get SIGQUIT, e.g., when
68 + * pressing CTRL-\, but we don't want Vim to exit then. */
69 + if (in_mch_delay && sigarg == SIGQUIT)
73 /* When SIGHUP, SIGQUIT, etc. are blocked: postpone the effect and return
74 * here. This avoids that a non-reentrant function is interrupted, e.g.,
75 * free(). Calling free() again may then cause a crash. */
76 *** ../vim-7.1.244/src/version.c Wed Feb 6 17:33:19 2008
77 --- src/version.c Sun Feb 10 22:04:09 2008
81 { /* Add new patch number below this line */
87 Me? A skeptic? I trust you have proof.
89 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
90 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
91 \\\ download, build and distribute -- http://www.A-A-P.org ///
92 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///