]>
Commit | Line | Data |
---|---|---|
c6060300 MT |
1 | To: vim_dev@googlegroups.com |
2 | Subject: Patch 7.3.290 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.3.290 | |
11 | Problem: When a BufWriteCmd autocommand resets 'modified' this doesn't | |
12 | change older buffer states to be marked as 'modified' like | |
13 | ":write" does. (Yukihiro Nakadaira) | |
14 | Solution: When the BufWriteCmd resets 'modified' then adjust the undo | |
15 | information like ":write" does. | |
16 | Files: src/fileio.c | |
17 | ||
18 | ||
19 | *** ../vim-7.3.289/src/fileio.c 2011-07-20 18:29:33.000000000 +0200 | |
20 | --- src/fileio.c 2011-08-29 21:49:27.000000000 +0200 | |
21 | *************** | |
22 | *** 3342,3349 **** | |
23 | } | |
24 | else if (reset_changed && whole) | |
25 | { | |
26 | ! if (!(did_cmd = apply_autocmds_exarg(EVENT_BUFWRITECMD, | |
27 | ! sfname, sfname, FALSE, curbuf, eap))) | |
28 | { | |
29 | #ifdef FEAT_QUICKFIX | |
30 | if (overwriting && bt_nofile(curbuf)) | |
31 | --- 3342,3363 ---- | |
32 | } | |
33 | else if (reset_changed && whole) | |
34 | { | |
35 | ! int was_changed = curbufIsChanged(); | |
36 | ! | |
37 | ! did_cmd = apply_autocmds_exarg(EVENT_BUFWRITECMD, | |
38 | ! sfname, sfname, FALSE, curbuf, eap); | |
39 | ! if (did_cmd) | |
40 | ! { | |
41 | ! if (was_changed && !curbufIsChanged()) | |
42 | ! { | |
43 | ! /* Written everything correctly and BufWriteCmd has reset | |
44 | ! * 'modified': Correct the undo information so that an | |
45 | ! * undo now sets 'modified'. */ | |
46 | ! u_unchanged(curbuf); | |
47 | ! u_update_save_nr(curbuf); | |
48 | ! } | |
49 | ! } | |
50 | ! else | |
51 | { | |
52 | #ifdef FEAT_QUICKFIX | |
53 | if (overwriting && bt_nofile(curbuf)) | |
54 | *** ../vim-7.3.289/src/version.c 2011-08-28 16:02:23.000000000 +0200 | |
55 | --- src/version.c 2011-09-02 11:37:25.000000000 +0200 | |
56 | *************** | |
57 | *** 711,712 **** | |
58 | --- 711,714 ---- | |
59 | { /* Add new patch number below this line */ | |
60 | + /**/ | |
61 | + 290, | |
62 | /**/ | |
63 | ||
64 | -- | |
65 | OLD WOMAN: Well, how did you become king, then? | |
66 | ARTHUR: The Lady of the Lake, her arm clad in the purest shimmering samite, | |
67 | held Excalibur aloft from the bosom of the water to signify by Divine | |
68 | Providence ... that I, Arthur, was to carry Excalibur ... That is | |
69 | why I am your king! | |
70 | "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD | |
71 | ||
72 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
73 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
74 | \\\ an exciting new programming language -- http://www.Zimbu.org /// | |
75 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |