summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvimboss <devnull@localhost>2007-08-12 13:51:26 +0000
committervimboss <devnull@localhost>2007-08-12 13:51:26 +0000
commitbd12fd6297087918d046c7918bef868d367f8ad4 (patch)
treebf10bea06f9f599de61c4b90295936935f0ee8f7
parent436b49c9407b78eca54cd9f5e183413bc18aee46 (diff)
downloadvim-bd12fd6297087918d046c7918bef868d367f8ad4.tar.gz
updated for version 7.1-066v7.1.066v7-1-066
-rw-r--r--src/buffer.c1
-rw-r--r--src/fileio.c7
-rw-r--r--src/option.c12
-rw-r--r--src/structs.h1
-rw-r--r--src/version.c2
5 files changed, 22 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 6d44fa74..c9479015 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -502,6 +502,7 @@ buf_clear_file(buf)
buf->b_start_eol = TRUE;
#ifdef FEAT_MBYTE
buf->b_p_bomb = FALSE;
+ buf->b_start_bomb = FALSE;
#endif
buf->b_ml.ml_mfp = NULL;
buf->b_ml.ml_flags = ML_EMPTY; /* empty buffer */
diff --git a/src/fileio.c b/src/fileio.c
index 3f094d4e..801caba9 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -654,6 +654,7 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
curbuf->b_start_eol = TRUE;
#ifdef FEAT_MBYTE
curbuf->b_p_bomb = FALSE;
+ curbuf->b_start_bomb = FALSE;
#endif
}
@@ -912,7 +913,10 @@ retry:
file_rewind = FALSE;
#ifdef FEAT_MBYTE
if (set_options)
+ {
curbuf->b_p_bomb = FALSE;
+ curbuf->b_start_bomb = FALSE;
+ }
conv_error = 0;
#endif
}
@@ -1361,7 +1365,10 @@ retry:
size -= blen;
mch_memmove(ptr, ptr + blen, (size_t)size);
if (set_options)
+ {
curbuf->b_p_bomb = TRUE;
+ curbuf->b_start_bomb = TRUE;
+ }
}
if (fio_flags == FIO_UCSBOM)
diff --git a/src/option.c b/src/option.c
index 68a779fd..d02605cc 100644
--- a/src/option.c
+++ b/src/option.c
@@ -7118,6 +7118,11 @@ set_bool_option(opt_idx, varp, value, opt_flags)
/* when 'endofline' is changed, redraw the window title */
else if ((int *)varp == &curbuf->b_p_eol)
need_maketitle = TRUE;
+#ifdef FEAT_MBYTE
+ /* when 'bomb' is changed, redraw the window title */
+ else if ((int *)varp == &curbuf->b_p_bomb)
+ need_maketitle = TRUE;
+#endif
#endif
/* when 'bin' is set also set some other options */
@@ -10604,6 +10609,8 @@ save_file_ff(buf)
buf->b_start_ffc = *buf->b_p_ff;
buf->b_start_eol = buf->b_p_eol;
#ifdef FEAT_MBYTE
+ buf->b_start_bomb = buf->b_p_bomb;
+
/* Only use free/alloc when necessary, they take time. */
if (buf->b_start_fenc == NULL
|| STRCMP(buf->b_start_fenc, buf->b_p_fenc) != 0)
@@ -10617,7 +10624,8 @@ save_file_ff(buf)
/*
* Return TRUE if 'fileformat' and/or 'fileencoding' has a different value
* from when editing started (save_file_ff() called).
- * Also when 'endofline' was changed and 'binary' is set.
+ * Also when 'endofline' was changed and 'binary' is set, or when 'bomb' was
+ * changed and 'binary' is not set.
* Don't consider a new, empty buffer to be changed.
*/
int
@@ -10636,6 +10644,8 @@ file_ff_differs(buf)
if (buf->b_p_bin && buf->b_start_eol != buf->b_p_eol)
return TRUE;
#ifdef FEAT_MBYTE
+ if (!buf->b_p_bin && buf->b_start_bomb != buf->b_p_bomb)
+ return TRUE;
if (buf->b_start_fenc == NULL)
return (*buf->b_p_fenc != NUL);
return (STRCMP(buf->b_start_fenc, buf->b_p_fenc) != 0);
diff --git a/src/structs.h b/src/structs.h
index c85fc05e..880f0b02 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1453,6 +1453,7 @@ struct file_buffer
#ifdef FEAT_MBYTE
char_u *b_start_fenc; /* 'fileencoding' when edit started or NULL */
int b_bad_char; /* "++bad=" argument when edit started or 0 */
+ int b_start_bomb; /* 'bomb' when it was read */
#endif
#ifdef FEAT_EVAL
diff --git a/src/version.c b/src/version.c
index 4bbf44a1..79332235 100644
--- a/src/version.c
+++ b/src/version.c
@@ -667,6 +667,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 66,
+/**/
65,
/**/
64,