]> git.pld-linux.org Git - packages/vim.git/blob - 6.2.087
- initial import
[packages/vim.git] / 6.2.087
1 To: vim-dev@vim.org
2 Subject: Patch 6.2.087
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 6.2.087
11 Problem:    CTRL-^ doesn't use the 'confirm' option.  Same problem with
12             ":bnext". (Yakov Lerner)
13 Solution:   Put up a dialog for a changed file when 'confirm' is set in more
14             situations.
15 Files:      src/buffer.c, src/ex_cmds.c
16
17
18 *** ../vim-6.2.086/src/buffer.c Thu Sep 11 21:08:22 2003
19 --- src/buffer.c        Sun Sep  7 23:17:03 2003
20 ***************
21 *** 963,971 ****
22   
23         if (!forceit && bufIsChanged(buf))
24         {
25 !           EMSGN(_("E89: No write since last change for buffer %ld (add ! to override)"),
26 !                       buf->b_fnum);
27 !           return FAIL;
28         }
29   
30         /*
31 --- 963,986 ----
32   
33         if (!forceit && bufIsChanged(buf))
34         {
35 ! #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
36 !           if ((p_confirm || cmdmod.confirm) && p_write)
37 !           {
38 !               dialog_changed(buf, FALSE);
39 ! # ifdef FEAT_AUTOCMD
40 !               if (!buf_valid(buf))
41 !                   /* Autocommand deleted buffer, oops!  It's not changed
42 !                    * now. */
43 !                   return FAIL;
44 ! # endif
45 !           }
46 !           if (bufIsChanged(buf))
47 ! #endif
48 !           {
49 !               EMSGN(_("E89: No write since last change for buffer %ld (add ! to override)"),
50 !                                                                buf->b_fnum);
51 !               return FAIL;
52 !           }
53         }
54   
55         /*
56 ***************
57 *** 1162,1169 ****
58        */
59       if (action == DOBUF_GOTO && !can_abandon(curbuf, forceit))
60       {
61 !       EMSG(_(e_nowrtmsg));
62 !       return FAIL;
63       }
64   
65       /* Go to the other buffer. */
66 --- 1177,1198 ----
67        */
68       if (action == DOBUF_GOTO && !can_abandon(curbuf, forceit))
69       {
70 ! #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
71 !       if ((p_confirm || cmdmod.confirm) && p_write)
72 !       {
73 !           dialog_changed(curbuf, FALSE);
74 ! # ifdef FEAT_AUTOCMD
75 !           if (!buf_valid(buf))
76 !               /* Autocommand deleted buffer, oops! */
77 !               return FAIL;
78 ! # endif
79 !       }
80 !       if (bufIsChanged(curbuf))
81 ! #endif
82 !       {
83 !           EMSG(_(e_nowrtmsg));
84 !           return FAIL;
85 !       }
86       }
87   
88       /* Go to the other buffer. */
89 *** ../vim-6.2.086/src/ex_cmds.c        Tue Sep  9 22:48:37 2003
90 --- src/ex_cmds.c       Tue Sep  9 22:03:12 2003
91 ***************
92 *** 2464,2474 ****
93       if (other && !forceit && curbuf->b_nwindows == 1 && !P_HID(curbuf)
94                    && curbufIsChanged() && autowrite(curbuf, forceit) == FAIL)
95       {
96 !       if (other)
97 !           --no_wait_return;
98 !       EMSG(_(e_nowrtmsg));
99 !       retval = 2;     /* file has been changed */
100 !       goto theend;
101       }
102       if (other)
103         --no_wait_return;
104 --- 2464,2481 ----
105       if (other && !forceit && curbuf->b_nwindows == 1 && !P_HID(curbuf)
106                    && curbufIsChanged() && autowrite(curbuf, forceit) == FAIL)
107       {
108 ! #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
109 !       if (p_confirm && p_write)
110 !           dialog_changed(curbuf, FALSE);
111 !       if (curbufIsChanged())
112 ! #endif
113 !       {
114 !           if (other)
115 !               --no_wait_return;
116 !           EMSG(_(e_nowrtmsg));
117 !           retval = 2; /* file has been changed */
118 !           goto theend;
119 !       }
120       }
121       if (other)
122         --no_wait_return;
123 *** ../vim-6.2.086/src/version.c        Thu Sep 11 21:31:02 2003
124 --- src/version.c       Thu Sep 11 21:32:40 2003
125 ***************
126 *** 632,633 ****
127 --- 632,635 ----
128   {   /* Add new patch number below this line */
129 + /**/
130 +     87,
131   /**/
132
133 -- 
134 Yesterday, all my deadlines seemed so far away
135 now it looks as though it's freeze in four days
136 oh I believe in cvs..
137     [ CVS log "Beatles style" for FreeBSD ports/INDEX, Satoshi Asami ]
138
139  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
140 ///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
141 \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
142  \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
This page took 0.078653 seconds and 3 git commands to generate.