diff src/fileio.c @ 615:7fe13e0f5dce v7.0175

updated for version 7.0175
author vimboss
date Thu, 22 Dec 2005 22:47:02 +0000
parents b9370cfb091a
children 1797ca316f1c
line wrap: on
line diff
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -8827,6 +8827,18 @@ get_event_name(xp, idx)
 #endif	/* FEAT_CMDL_COMPL */
 
 /*
+ * Return TRUE if autocmd is supported.
+ */
+    int
+autocmd_supported(name)
+    char_u	*name;
+{
+    char_u *p;
+
+    return (event_name2nr(name, &p) != NUM_EVENTS);
+}
+
+/*
  * Return TRUE if an autocommand is defined for a group, event and
  * pattern:  The group can be omitted to accept any group. "event" and "pattern"
  * can be NULL to accept any event and pattern. "pattern" can be NULL to accept
@@ -8852,11 +8864,11 @@ au_exists(arg)
     int		group;
     int		retval = FALSE;
 
-    /* Make a copy so that we can change the '#' to a NUL. */
+    /* Make a copy so that we can change the '#' chars to a NUL. */
     arg_save = vim_strsave(arg);
     if (arg_save == NULL)
 	return FALSE;
-    p = vim_strchr(arg, '#');
+    p = vim_strchr(arg_save, '#');
     if (p != NULL)
 	*p++ = NUL;