summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-03-07 22:29:51 +0000
committerBram Moolenaar <Bram@vim.org>2006-03-07 22:29:51 +0000
commita203182302733c0ea98d66ee1f576f251697dc81 (patch)
treed15b59030f051a7768f77f7a98c860a0387c09fe /src
parent362e1a30c6f3527d5d0efc328c2fb448290cd6fc (diff)
updated for version 7.0217
Diffstat (limited to 'src')
-rw-r--r--src/ex_docmd.c2
-rw-r--r--src/fileio.c1
-rw-r--r--src/message.c12
-rw-r--r--src/os_riscos.c2
-rw-r--r--src/os_unix.c11
-rw-r--r--src/os_vms.c6
-rw-r--r--src/os_win32.c2
-rw-r--r--src/spell.c1
-rw-r--r--src/vim.h1
9 files changed, 24 insertions, 14 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index e1e5a83c4b..31aa4ace90 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -2426,7 +2426,7 @@ do_one_cmd(cmdlinep, sourcing,
get_flags(&ea);
/* no arguments allowed */
if (!ni && !(ea.argt & EXTRA) && *ea.arg != NUL
- && vim_strchr((char_u *)"|\"", *ea.arg) == NULL)
+ && *ea.arg != '"' && (*ea.arg != '|' || (ea.argt & TRLBAR) == 0))
{
errormsg = (char_u *)_(e_trailing);
goto doend;
diff --git a/src/fileio.c b/src/fileio.c
index 8333f73b24..205e5f0c6a 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -6983,6 +6983,7 @@ static struct event_name
{"QuickFixCmdPre", EVENT_QUICKFIXCMDPRE},
{"RemoteReply", EVENT_REMOTEREPLY},
{"SessionLoadPost", EVENT_SESSIONLOADPOST},
+ {"SourcePre", EVENT_SOURCEPRE},
{"SpellFileMissing",EVENT_SPELLFILEMISSING},
{"StdinReadPost", EVENT_STDINREADPOST},
{"StdinReadPre", EVENT_STDINREADPRE},
diff --git a/src/message.c b/src/message.c
index c3acc409a6..e0971b67bc 100644
--- a/src/message.c
+++ b/src/message.c
@@ -3846,7 +3846,7 @@ tv_str(tvs, idxp)
/*
* This code was included to provide a portable vsnprintf() and snprintf().
- * Some systems may provide their own, but we always use these for
+ * Some systems may provide their own, but we always use this one for
* consistency.
*
* This code is based on snprintf.c - a portable implementation of snprintf
@@ -3866,14 +3866,14 @@ tv_str(tvs, idxp)
* The locale is not used, the string is used as a byte string. This is only
* relevant for double-byte encodings where the second byte may be '%'.
*
- * It is permitted for str_m to be zero, and it is permitted to specify NULL
- * pointer for resulting string argument if str_m is zero (as per ISO C99).
+ * It is permitted for "str_m" to be zero, and it is permitted to specify NULL
+ * pointer for resulting string argument if "str_m" is zero (as per ISO C99).
*
* The return value is the number of characters which would be generated
* for the given input, excluding the trailing null. If this value
- * is greater or equal to str_m, not all characters from the result
- * have been stored in str, output bytes beyond the (str_m-1) -th character
- * are discarded. If str_m is greater than zero it is guaranteed
+ * is greater or equal to "str_m", not all characters from the result
+ * have been stored in str, output bytes beyond the ("str_m"-1) -th character
+ * are discarded. If "str_m" is greater than zero it is guaranteed
* the resulting string will be null-terminated.
*/
diff --git a/src/os_riscos.c b/src/os_riscos.c
index cc52d85a69..8d6df27802 100644
--- a/src/os_riscos.c
+++ b/src/os_riscos.c
@@ -637,7 +637,6 @@ mch_isdir(name)
return FALSE;
}
-#if defined(FEAT_EVAL) || defined(PROTO)
/*
* Return 1 if "name" can be executed, 0 if not.
* Return -1 if unknown. Requires which to work.
@@ -663,7 +662,6 @@ mch_can_exe(name)
vim_free(p);
return retval;
}
-#endif
/*
* Check what "name" is:
diff --git a/src/os_unix.c b/src/os_unix.c
index c60ddafe52..a80bd21807 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -2610,8 +2610,6 @@ mch_isdir(name)
#endif
}
-#if defined(FEAT_EVAL) || defined(PROTO)
-
static int executable_file __ARGS((char_u *name));
/*
@@ -2681,7 +2679,6 @@ mch_can_exe(name)
vim_free(buf);
return retval;
}
-#endif
/*
* Check what "name" is:
@@ -4924,6 +4921,10 @@ mch_expand_wildcards(num_pat, pat, num_file, file, flags)
if ((dir && !(flags & EW_DIR)) || (!dir && !(flags & EW_FILE)))
continue;
+ /* Skip files that are not executable if we check for that. */
+ if (!dir && (flags & EW_EXEC) && !mch_can_exe(p))
+ continue;
+
if (--files_free == 0)
{
/* need more room in table of pointers */
@@ -5390,6 +5391,10 @@ mch_expand_wildcards(num_pat, pat, num_file, file, flags)
if ((dir && !(flags & EW_DIR)) || (!dir && !(flags & EW_FILE)))
continue;
+ /* Skip files that are not executable if we check for that. */
+ if (!dir && (flags & EW_EXEC) && !mch_can_exe((*file)[i]))
+ continue;
+
p = alloc((unsigned)(STRLEN((*file)[i]) + 1 + dir));
if (p)
{
diff --git a/src/os_vms.c b/src/os_vms.c
index b1706fea38..28976b131a 100644
--- a/src/os_vms.c
+++ b/src/os_vms.c
@@ -445,10 +445,16 @@ mch_expand_wildcards(int num_pat, char_u **pat, int *num_file, char_u ***file, i
/* files should exist if expanding interactively */
if (!(flags & EW_NOTFOUND) && mch_getperm(vms_fmatch[i]) < 0)
continue;
+
/* do not include directories */
dir = (mch_isdir(vms_fmatch[i]));
if (( dir && !(flags & EW_DIR)) || (!dir && !(flags & EW_FILE)))
continue;
+
+ /* Skip files that are not executable if we check for that. */
+ if (!dir && (flags & EW_EXEC) && !mch_can_exe(vms_fmatch[i]))
+ continue;
+
/* allocate memory for pointers */
if (--files_free < 1)
{
diff --git a/src/os_win32.c b/src/os_win32.c
index a45255caee..330ce5a572 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -2617,7 +2617,6 @@ mch_writable(char_u *name)
|| (perm & FILE_ATTRIBUTE_DIRECTORY)));
}
-#if defined(FEAT_EVAL) || defined(PROTO)
/*
* Return 1 if "name" can be executed, 0 if not.
* Return -1 if unknown.
@@ -2663,7 +2662,6 @@ mch_can_exe(char_u *name)
}
return FALSE;
}
-#endif
/*
* Check what "name" is:
diff --git a/src/spell.c b/src/spell.c
index fe46006c61..090b77f2dd 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -15110,6 +15110,7 @@ spell_dump_compl(buf, pat, ic, dir, dumpflags_arg)
/* Done all bytes at this node, go up one level. */
--depth;
line_breakcheck();
+ ins_compl_check_keys(50);
}
else
{
diff --git a/src/vim.h b/src/vim.h
index ff57561d97..a58ce7c8c3 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1124,6 +1124,7 @@ enum auto_event
EVENT_FUNCUNDEFINED, /* if calling a function which doesn't exist */
EVENT_REMOTEREPLY, /* upon string reception from a remote vim */
EVENT_SWAPEXISTS, /* found existing swap file */
+ EVENT_SOURCEPRE, /* before sourcing a Vim script */
EVENT_SPELLFILEMISSING, /* spell file missing */
EVENT_CURSORMOVED, /* cursor was moved */
EVENT_CURSORMOVEDI, /* cursor was moved in Insert mode */