]> git.pld-linux.org Git - packages/vim.git/blob - 7.1.245
- recognize update_mime_database
[packages/vim.git] / 7.1.245
1 To: vim-dev@vim.org
2 Subject: Patch 7.1.245
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.245
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
14             SIGQUIT.
15 Files:      src/os_unix.c
16
17
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
20 ***************
21 *** 195,200 ****
22 --- 195,201 ----
23   static int    show_shell_mess = TRUE;
24   #endif
25   static int    deadly_signal = 0;          /* The signal we caught */
26 + static int    in_mch_delay = FALSE;       /* sleeping in mch_delay() */
27   
28   static int curr_tmode = TMODE_COOK;   /* contains current terminal mode */
29   
30 ***************
31 *** 538,544 ****
32       if (ignoreinput)
33       {
34         /* Go to cooked mode without echo, to allow SIGINT interrupting us
35 !        * here */
36         old_tmode = curr_tmode;
37         if (curr_tmode == TMODE_RAW)
38             settmode(TMODE_SLEEP);
39 --- 539,547 ----
40       if (ignoreinput)
41       {
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);
49 ***************
50 *** 602,607 ****
51 --- 605,611 ----
52   #endif
53   
54         settmode(old_tmode);
55 +       in_mch_delay = FALSE;
56       }
57       else
58         WaitForChar(msec);
59 ***************
60 *** 922,927 ****
61 --- 926,939 ----
62   #endif
63   
64   #ifdef SIGHASARG
65 + # ifdef SIGQUIT
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)
70 +       SIGRETURN;
71 + # endif
72
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
78 ***************
79 *** 668,669 ****
80 --- 668,671 ----
81   {   /* Add new patch number below this line */
82 + /**/
83 +     245,
84   /**/
85
86 -- 
87 Me?  A skeptic?  I trust you have proof.
88
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    ///
This page took 0.03132 seconds and 3 git commands to generate.