4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: When a buffer is modified and 'autowriteall' is set, ":quit"
12 results in an endless loop when there is a conversion error while
13 writing. (Nikolai Weibull)
14 Solution: Make autowrite() return FAIL if the buffer is still changed after
19 *** ../vim-7.0.194/src/ex_cmds2.c Tue Jan 16 21:31:38 2007
20 --- src/ex_cmds2.c Tue Feb 13 06:11:28 2007
26 if (!(p_aw || p_awa) || !p_write
28 ! /* never autowrite a "nofile" or "nowrite" buffer */
29 ! || bt_dontwrite(buf)
31 ! || (!forceit && buf->b_p_ro) || buf->b_ffname == NULL)
33 ! return buf_write_all(buf, forceit);
43 if (!(p_aw || p_awa) || !p_write
45 ! /* never autowrite a "nofile" or "nowrite" buffer */
46 ! || bt_dontwrite(buf)
48 ! || (!forceit && buf->b_p_ro) || buf->b_ffname == NULL)
50 ! r = buf_write_all(buf, forceit);
52 ! /* Writing may succeed but the buffer still changed, e.g., when there is a
53 ! * conversion error. We do want to return FAIL then. */
54 ! if (buf_valid(buf) && bufIsChanged(buf))
63 if (buf == NULL) /* No buffers changed */
66 + /* Try auto-writing the buffer. If this fails but the buffer no
67 + * longer exists it's not changed, that's OK. */
68 if (check_changed(buf, p_awa, TRUE, FALSE, TRUE) && buf_valid(buf))
69 break; /* didn't save - still changes */
71 *** ../vim-7.0.194/src/version.c Tue Feb 13 04:03:05 2007
72 --- src/version.c Tue Feb 13 06:18:28 2007
76 { /* Add new patch number below this line */
82 hundred-and-one symptoms of being an internet addict:
83 115. You are late picking up your kid from school and try to explain
84 to the teacher you were stuck in Web traffic.
86 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
87 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
88 \\\ download, build and distribute -- http://www.A-A-P.org ///
89 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///