]> git.pld-linux.org Git - packages/vim.git/blob - 7.1.059
- typo
[packages/vim.git] / 7.1.059
1 To: vim-dev@vim.org
2 Subject: patch 7.1.059
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.1.059
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
15             compatible.
16 Files:      src/main.c
17
18
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
21 ***************
22 *** 954,960 ****
23       int               cmdwin;     /* TRUE when working in the command-line window */
24       int               noexmode;   /* TRUE when return on entering Ex mode */
25   {
26 !     oparg_T   oa;     /* operator arguments */
27   
28   #if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)
29       /* Setup to catch a terminating error from the X server.  Just ignore
30 --- 954,961 ----
31       int               cmdwin;     /* TRUE when working in the command-line window */
32       int               noexmode;   /* TRUE when return on entering Ex mode */
33   {
34 !     oparg_T   oa;                             /* operator arguments */
35 !     int               previous_got_int = FALSE;       /* "got_int" was TRUE */
36   
37   #if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)
38       /* Setup to catch a terminating error from the X server.  Just ignore
39 ***************
40 *** 1015,1026 ****
41                 need_fileinfo = FALSE;
42             }
43         }
44 !       if (got_int && !global_busy)
45         {
46 !           if (!quit_more)
47 !               (void)vgetc();          /* flush all buffers */
48 !           got_int = FALSE;
49         }
50         if (!exmode_active)
51             msg_scroll = FALSE;
52         quit_more = FALSE;
53 --- 1016,1047 ----
54                 need_fileinfo = FALSE;
55             }
56         }
57
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
60 !        * the ":g" command.
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. */
63 !       if (got_int)
64         {
65 !           if (noexmode && global_busy && !exmode_active && previous_got_int)
66 !           {
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;
70 !               State = NORMAL;
71 !           }
72 !           else if (!global_busy || !exmode_active)
73 !           {
74 !               if (!quit_more)
75 !                   (void)vgetc();              /* flush all buffers */
76 !               got_int = FALSE;
77 !           }
78 !           previous_got_int = TRUE;
79         }
80 +       else
81 +           previous_got_int = FALSE;
82
83         if (!exmode_active)
84             msg_scroll = FALSE;
85         quit_more = 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
88 ***************
89 *** 668,669 ****
90 --- 668,671 ----
91   {   /* Add new patch number below this line */
92 + /**/
93 +     59,
94   /**/
95
96 -- 
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
100
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    ///
This page took 0.136616 seconds and 3 git commands to generate.