forked from aniani/vim
updated for version 7.0123
This commit is contained in:
@@ -6665,11 +6665,25 @@ ex_splitview(eap)
|
||||
#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
|
||||
|
||||
12
src/fileio.c
12
src/fileio.c
@@ -7059,6 +7059,18 @@ au_find_group(name)
|
||||
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}".
|
||||
*/
|
||||
|
||||
10
src/misc2.c
10
src/misc2.c
@@ -4058,7 +4058,7 @@ vim_findfile_init(path, filename, stopdirs, level, free_visited, need_dir,
|
||||
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 @@ vim_findfile(search_ctx)
|
||||
|
||||
/* 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 @@ ff_path_in_stoplist(path, path_len, stopdirs_v)
|
||||
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 @@ ff_path_in_stoplist(path, path_len, stopdirs_v)
|
||||
* '/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
|
||||
|
||||
58
src/po/check.vim
Normal file
58
src/po/check.vim
Normal file
@@ -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
|
||||
@@ -22,6 +22,7 @@ void vim_deltempdir __ARGS((void));
|
||||
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));
|
||||
|
||||
@@ -323,13 +323,12 @@ qf_init_ext(efile, buf, tv, errorformat, newlist, lnumfirst, lnumlast)
|
||||
&& 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
|
||||
{
|
||||
|
||||
@@ -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 "
|
||||
|
||||
Reference in New Issue
Block a user