updated for version 7.0123
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index ab11dff..bb07582 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -6665,11 +6665,25 @@
#endif
&& eap->cmdidx != CMD_new)
{
- fname = do_browse(0, (char_u *)_("Edit File in new window"),
+ if (
+# ifdef FEAT_GUI
+ !gui.in_use &&
+# endif
+ au_has_group((char_u *)"FileExplorer"))
+ {
+ /* No browsing supported but we do have the file explorer:
+ * Edit the directory. */
+ if (*eap->arg == NUL || !mch_isdir(eap->arg))
+ eap->arg = (char_u *)".";
+ }
+ else
+ {
+ fname = do_browse(0, (char_u *)_("Edit File in new window"),
eap->arg, NULL, NULL, NULL, curbuf);
- if (fname == NULL)
- goto theend;
- eap->arg = fname;
+ if (fname == NULL)
+ goto theend;
+ eap->arg = fname;
+ }
}
cmdmod.browse = FALSE; /* Don't browse again in do_ecmd(). */
#endif
diff --git a/src/fileio.c b/src/fileio.c
index 7e14155..7c4c9ac 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -7059,6 +7059,18 @@
return AUGROUP_ERROR;
}
+#if defined(FEAT_BROWSE) || defined(PROTO)
+/*
+ * Return TRUE if augroup "name" exists.
+ */
+ int
+au_has_group(name)
+ char_u *name;
+{
+ return au_find_group(name) != AUGROUP_ERROR;
+}
+#endif
+
/*
* ":augroup {name}".
*/
diff --git a/src/misc2.c b/src/misc2.c
index 93b3bbe..704e176 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -4058,7 +4058,7 @@
else
ff_expand_buffer[len++] = FF_MAX_STAR_STAR_EXPAND;
wc_part = (char_u *)errpt;
- if (*wc_part != PATHSEP && *wc_part != NUL)
+ if (*wc_part != NUL && !vim_ispathsep(*wc_part))
{
EMSG2(_("E343: Invalid path: '**[number]' must be at the end of the path or be followed by '%s'."), PATHSEPSTR);
goto error_return;
@@ -4582,10 +4582,10 @@
/* cut of last dir */
while (path_end > ff_search_ctx->ffsc_start_dir
- && *path_end == PATHSEP)
+ && vim_ispathsep(*path_end))
path_end--;
while (path_end > ff_search_ctx->ffsc_start_dir
- && *(path_end-1) != PATHSEP)
+ && !vim_ispathsep(path_end[-1]))
path_end--;
*path_end = 0;
path_end--;
@@ -5050,7 +5050,7 @@
int i = 0;
/* eat up trailing path separators, except the first */
- while (path_len > 1 && path[path_len - 1] == PATHSEP)
+ while (path_len > 1 && vim_ispathsep(path[path_len - 1]))
path_len--;
/* if no path consider it as match */
@@ -5066,7 +5066,7 @@
* '/home/r' would also match '/home/rks'
*/
if (fnamencmp(stopdirs_v[i], path, path_len) == 0
- && stopdirs_v[i][path_len] == PATHSEP)
+ && vim_ispathsep(stopdirs_v[i][path_len]))
return TRUE;
}
else
diff --git a/src/po/check.vim b/src/po/check.vim
new file mode 100644
index 0000000..a5f25aa
--- /dev/null
+++ b/src/po/check.vim
@@ -0,0 +1,58 @@
+" Vim script for checking .po files.
+"
+" Go through the file and verify that all %...s items in "msgid" are identical
+" to the ones in "msgstr".
+
+if 1 " Only execute this if the eval feature is available.
+
+" Function to get a split line at the cursor.
+" Used for both msgid and msgstr lines.
+" Removes all text except % items and returns the result.
+func! GetMline()
+ let idline = substitute(getline('.'), '"\(.*\)"$', '\1', '')
+ while line('.') < line('$')
+ +
+ let line = getline('.')
+ if line[0] != '"'
+ break
+ endif
+ let idline .= substitute(line, '"\(.*\)"$', '\1', '')
+ endwhile
+
+ " remove everything but % items.
+ return substitute(idline, '[^%]*\(%[-+ #''.0-9*]*l\=[dsuxXpoc%]\)\=', '\1', 'g')
+endfunc
+
+" Start at the first "msgid" line.
+1
+/^msgid
+let startline = line('.')
+let error = 0
+
+while 1
+ if getline(line('.') - 1) !~ "no-c-format"
+ let fromline = GetMline()
+ if getline('.') !~ '^msgstr'
+ echo 'Missing "msgstr" in line ' . line('.')
+ let error = 1
+ endif
+ let toline = GetMline()
+ if fromline != toline
+ echo 'Mismatching % in line ' . (line('.') - 1)
+ let error = 1
+ endif
+ endif
+
+ " Find next msgid.
+ " Wrap around at the end of the file, quit when back at the first one.
+ /^msgid
+ if line('.') == startline
+ break
+ endif
+endwhile
+
+if error == 0
+ echo "OK"
+endif
+
+endif
diff --git a/src/proto/fileio.pro b/src/proto/fileio.pro
index 8b05113..2f5897c 100644
--- a/src/proto/fileio.pro
+++ b/src/proto/fileio.pro
@@ -22,6 +22,7 @@
char_u *vim_tempname __ARGS((int extra_char));
void forward_slash __ARGS((char_u *fname));
void aubuflocal_remove __ARGS((buf_T *buf));
+int au_has_group __ARGS((char_u *name));
void do_augroup __ARGS((char_u *arg, int del_group));
void free_all_autocmds __ARGS((void));
int check_ei __ARGS((void));
diff --git a/src/quickfix.c b/src/quickfix.c
index 5847ae1..bf0b0b8 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -323,13 +323,12 @@
&& efmp[1] != '\\' && efmp[1] != '%')
{
/* A file name may contain spaces, but this isn't in
- * "\f". use "[^x]\+" instead (x is next character) */
- *ptr++ = '[';
- *ptr++ = '^';
- *ptr++ = efmp[1];
- *ptr++ = ']';
- *ptr++ = '\\';
- *ptr++ = '+';
+ * "\f". For "%f:%l:%m" there may be a ":" in the
+ * file name. Use ".\{-1,}x" instead (x is the next
+ * character), the requirement that :999: follows
+ * should work. */
+ STRCPY(ptr, ".\\{-1,}");
+ ptr += 7;
}
else
{
diff --git a/src/version.h b/src/version.h
index 2c5193e..3fff8d6 100644
--- a/src/version.h
+++ b/src/version.h
@@ -36,5 +36,5 @@
#define VIM_VERSION_NODOT "vim70aa"
#define VIM_VERSION_SHORT "7.0aa"
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
-#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 1)"
-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 1, compiled "
+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 4)"
+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 4, compiled "