]> git.pld-linux.org Git - packages/vim.git/blame - 7.1.066
- updated to 7.1.285
[packages/vim.git] / 7.1.066
CommitLineData
0a7814d6
AG
1To: vim-dev@vim.org
2Subject: patch 7.1.066
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=ISO-8859-1
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.1.066
11Problem: When 'bomb' is set or reset the file should be considered
12 modified. (Tony Mechelynck)
13Solution: Handle like 'endofline'. (Martin Toft)
14Files: src/buffer.c, src/fileio.c, src/option.c, src/structs.h
15
16
17*** ../vim-7.1.065/src/buffer.c Mon Aug 6 22:27:12 2007
18--- src/buffer.c Sat Aug 11 16:56:57 2007
19***************
20*** 502,507 ****
21--- 502,508 ----
22 buf->b_start_eol = TRUE;
23 #ifdef FEAT_MBYTE
24 buf->b_p_bomb = FALSE;
25+ buf->b_start_bomb = FALSE;
26 #endif
27 buf->b_ml.ml_mfp = NULL;
28 buf->b_ml.ml_flags = ML_EMPTY; /* empty buffer */
29*** ../vim-7.1.065/src/fileio.c Tue Jul 10 17:09:51 2007
30--- src/fileio.c Sat Aug 11 16:56:57 2007
31***************
32*** 654,659 ****
33--- 654,660 ----
34 curbuf->b_start_eol = TRUE;
35 #ifdef FEAT_MBYTE
36 curbuf->b_p_bomb = FALSE;
37+ curbuf->b_start_bomb = FALSE;
38 #endif
39 }
40
41***************
42*** 912,918 ****
43--- 913,922 ----
44 file_rewind = FALSE;
45 #ifdef FEAT_MBYTE
46 if (set_options)
47+ {
48 curbuf->b_p_bomb = FALSE;
49+ curbuf->b_start_bomb = FALSE;
50+ }
51 conv_error = 0;
52 #endif
53 }
54***************
55*** 1361,1367 ****
56--- 1365,1374 ----
57 size -= blen;
58 mch_memmove(ptr, ptr + blen, (size_t)size);
59 if (set_options)
60+ {
61 curbuf->b_p_bomb = TRUE;
62+ curbuf->b_start_bomb = TRUE;
63+ }
64 }
65
66 if (fio_flags == FIO_UCSBOM)
67*** ../vim-7.1.065/src/option.c Tue Jul 24 14:57:16 2007
68--- src/option.c Sat Aug 11 16:56:57 2007
69***************
70*** 7118,7123 ****
71--- 7118,7128 ----
72 /* when 'endofline' is changed, redraw the window title */
73 else if ((int *)varp == &curbuf->b_p_eol)
74 need_maketitle = TRUE;
75+ #ifdef FEAT_MBYTE
76+ /* when 'bomb' is changed, redraw the window title */
77+ else if ((int *)varp == &curbuf->b_p_bomb)
78+ need_maketitle = TRUE;
79+ #endif
80 #endif
81
82 /* when 'bin' is set also set some other options */
83***************
84*** 10604,10609 ****
85--- 10609,10616 ----
86 buf->b_start_ffc = *buf->b_p_ff;
87 buf->b_start_eol = buf->b_p_eol;
88 #ifdef FEAT_MBYTE
89+ buf->b_start_bomb = buf->b_p_bomb;
90+
91 /* Only use free/alloc when necessary, they take time. */
92 if (buf->b_start_fenc == NULL
93 || STRCMP(buf->b_start_fenc, buf->b_p_fenc) != 0)
94***************
95*** 10617,10623 ****
96 /*
97 * Return TRUE if 'fileformat' and/or 'fileencoding' has a different value
98 * from when editing started (save_file_ff() called).
99! * Also when 'endofline' was changed and 'binary' is set.
100 * Don't consider a new, empty buffer to be changed.
101 */
102 int
103--- 10624,10631 ----
104 /*
105 * Return TRUE if 'fileformat' and/or 'fileencoding' has a different value
106 * from when editing started (save_file_ff() called).
107! * Also when 'endofline' was changed and 'binary' is set, or when 'bomb' was
108! * changed and 'binary' is not set.
109 * Don't consider a new, empty buffer to be changed.
110 */
111 int
112***************
113*** 10636,10641 ****
114--- 10644,10651 ----
115 if (buf->b_p_bin && buf->b_start_eol != buf->b_p_eol)
116 return TRUE;
117 #ifdef FEAT_MBYTE
118+ if (!buf->b_p_bin && buf->b_start_bomb != buf->b_p_bomb)
119+ return TRUE;
120 if (buf->b_start_fenc == NULL)
121 return (*buf->b_p_fenc != NUL);
122 return (STRCMP(buf->b_start_fenc, buf->b_p_fenc) != 0);
123*** ../vim-7.1.065/src/structs.h Thu Jul 26 22:55:11 2007
124--- src/structs.h Sat Aug 11 16:56:57 2007
125***************
126*** 1453,1458 ****
127--- 1453,1459 ----
128 #ifdef FEAT_MBYTE
129 char_u *b_start_fenc; /* 'fileencoding' when edit started or NULL */
130 int b_bad_char; /* "++bad=" argument when edit started or 0 */
131+ int b_start_bomb; /* 'bomb' when it was read */
132 #endif
133
134 #ifdef FEAT_EVAL
135*** ../vim-7.1.065/src/version.c Sun Aug 12 15:24:05 2007
136--- src/version.c Sun Aug 12 15:48:34 2007
137***************
138*** 668,669 ****
139--- 668,671 ----
140 { /* Add new patch number below this line */
141+ /**/
142+ 66,
143 /**/
144
145--
146hundred-and-one symptoms of being an internet addict:
147127. You bring your laptop and cellular phone to church.
148
149 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
150/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
151\\\ download, build and distribute -- http://www.A-A-P.org ///
152 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
This page took 0.046436 seconds and 4 git commands to generate.