summaryrefslogtreecommitdiffstats
path: root/src/fileio.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-04-27 00:02:13 +0000
committerBram Moolenaar <Bram@vim.org>2006-04-27 00:02:13 +0000
commitf193fffd16563cfbe7c02a21e19c8bb11707581d (patch)
tree4bae3092421aa986103b8000b1012989a9ea49e6 /src/fileio.c
parent551dbcc9b604c2992f908fb475e797fcc116315b (diff)
updated for version 7.0f02v7.0f02
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 27d8ed7e70..01953f381a 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -829,7 +829,8 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
/* When the file is utf-8 but a character doesn't fit in
* 'encoding' don't retry. In help text editing utf-8 bytes
* doesn't make sense. */
- keep_dest_enc = TRUE;
+ if (!enc_utf8)
+ keep_dest_enc = TRUE;
}
fenc_alloced = FALSE;
}
@@ -7485,12 +7486,13 @@ event_ignored(event)
{
char_u *p = p_ei;
- if (STRICMP(p_ei, "all") == 0)
- return TRUE;
-
- while (*p)
+ while (*p != NUL)
+ {
+ if (STRNICMP(p, "all", 3) == 0 && (p[3] == NUL || p[3] == ','))
+ return TRUE;
if (event_name2nr(p, &p) == event)
return TRUE;
+ }
return FALSE;
}
@@ -7503,12 +7505,17 @@ check_ei()
{
char_u *p = p_ei;
- if (STRICMP(p_ei, "all") == 0)
- return OK;
-
while (*p)
- if (event_name2nr(p, &p) == NUM_EVENTS)
+ {
+ if (STRNICMP(p, "all", 3) == 0 && (p[3] == NUL || p[3] == ','))
+ {
+ p += 3;
+ if (*p == ',')
+ ++p;
+ }
+ else if (event_name2nr(p, &p) == NUM_EVENTS)
return FAIL;
+ }
return OK;
}