4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: When in Ex mode and doing "g/^/vi" and then pressing CTRL-C Vim
12 hangs and beeps. (Antony Scriven)
13 Solution: Clear "got_int" in the main loop to avoid the hang. When typing
14 CTRL-C twice in a row abort the ":g" command. This is Vi
19 *** ../vim-7.1.058/src/main.c Tue Jun 19 20:30:46 2007
20 --- src/main.c Tue Aug 7 22:40:35 2007
23 int cmdwin; /* TRUE when working in the command-line window */
24 int noexmode; /* TRUE when return on entering Ex mode */
26 ! oparg_T oa; /* operator arguments */
28 #if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)
29 /* Setup to catch a terminating error from the X server. Just ignore
31 int cmdwin; /* TRUE when working in the command-line window */
32 int noexmode; /* TRUE when return on entering Ex mode */
34 ! oparg_T oa; /* operator arguments */
35 ! int previous_got_int = FALSE; /* "got_int" was TRUE */
37 #if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)
38 /* Setup to catch a terminating error from the X server. Just ignore
41 need_fileinfo = FALSE;
44 ! if (got_int && !global_busy)
47 ! (void)vgetc(); /* flush all buffers */
54 need_fileinfo = FALSE;
58 ! /* Reset "got_int" now that we got back to the main loop. Except when
59 ! * inside a ":g/pat/cmd" command, then the "got_int" needs to abort
61 ! * For ":g/pat/vi" we reset "got_int" when used once. When used
62 ! * a second time we go back to Ex mode and abort the ":g" command. */
65 ! if (noexmode && global_busy && !exmode_active && previous_got_int)
67 ! /* Typed two CTRL-C in a row: go back to ex mode as if "Q" was
68 ! * used and keep "got_int" set, so that it aborts ":g". */
69 ! exmode_active = EXMODE_NORMAL;
72 ! else if (!global_busy || !exmode_active)
75 ! (void)vgetc(); /* flush all buffers */
78 ! previous_got_int = TRUE;
81 + previous_got_int = FALSE;
86 *** ../vim-7.1.058/src/version.c Wed Aug 8 22:48:16 2007
87 --- src/version.c Fri Aug 10 21:30:39 2007
91 { /* Add new patch number below this line */
97 hundred-and-one symptoms of being an internet addict:
98 116. You are living with your boyfriend who networks your respective
99 computers so you can sit in separate rooms and email each other
101 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
102 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
103 \\\ download, build and distribute -- http://www.A-A-P.org ///
104 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///