mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
Merge upstream
This commit is contained in:
@@ -441,13 +441,20 @@ between files with almost the same name. If there are multiple matches,
|
||||
those files with an extension that is in the 'suffixes' option are ignored.
|
||||
The default is ".bak,~,.o,.h,.info,.swp,.obj", which means that files ending
|
||||
in ".bak", "~", ".o", ".h", ".info", ".swp" and ".obj" are sometimes ignored.
|
||||
It is impossible to ignore suffixes with two dots. Examples:
|
||||
|
||||
An empty entry, two consecutive commas, match a file name that does not
|
||||
contain a ".", thus has no suffix. This is useful to ignore "prog" and prefer
|
||||
"prog.c".
|
||||
|
||||
Examples:
|
||||
|
||||
pattern: files: match: ~
|
||||
test* test.c test.h test.o test.c
|
||||
test* test.h test.o test.h and test.o
|
||||
test* test.i test.h test.c test.i and test.c
|
||||
|
||||
It is impossible to ignore suffixes with two dots.
|
||||
|
||||
If there is more than one matching file (after ignoring the ones matching
|
||||
the 'suffixes' option) the first file name is inserted. You can see that
|
||||
there is only one match when you type 'wildchar' twice and the completed
|
||||
|
||||
+5
-7
@@ -3708,11 +3708,10 @@ get_map_mode(cmdp, forceit)
|
||||
* Clear all mappings or abbreviations.
|
||||
* 'abbr' should be FALSE for mappings, TRUE for abbreviations.
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
map_clear(cmdp, arg, forceit, abbr)
|
||||
char_u *cmdp;
|
||||
char_u *arg;
|
||||
char_u *arg UNUSED;
|
||||
int forceit;
|
||||
int abbr;
|
||||
{
|
||||
@@ -3741,13 +3740,12 @@ map_clear(cmdp, arg, forceit, abbr)
|
||||
/*
|
||||
* Clear all mappings in "mode".
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
map_clear_int(buf, mode, local, abbr)
|
||||
buf_T *buf; /* buffer for local mappings */
|
||||
int mode; /* mode in which to delete */
|
||||
int local; /* TRUE for buffer-local mappings */
|
||||
int abbr; /* TRUE for abbreviations */
|
||||
buf_T *buf UNUSED; /* buffer for local mappings */
|
||||
int mode; /* mode in which to delete */
|
||||
int local UNUSED; /* TRUE for buffer-local mappings */
|
||||
int abbr; /* TRUE for abbreviations */
|
||||
{
|
||||
mapblock_T *mp, **mpp;
|
||||
int hash;
|
||||
|
||||
@@ -720,9 +720,11 @@ ex_perl(eap)
|
||||
#ifdef HAVE_SANDBOX
|
||||
if (sandbox)
|
||||
{
|
||||
# ifndef MAKE_TEST /* avoid a warning for unreachable code */
|
||||
if ((safe = perl_get_sv( "VIM::safe", FALSE )) == NULL || !SvTRUE(safe))
|
||||
EMSG(_("E299: Perl evaluation forbidden in sandbox without the Safe module"));
|
||||
else
|
||||
# endif
|
||||
{
|
||||
PUSHMARK(SP);
|
||||
XPUSHs(safe);
|
||||
|
||||
+19
-5
@@ -8533,11 +8533,25 @@ match_suffix(fname)
|
||||
for (setsuf = p_su; *setsuf; )
|
||||
{
|
||||
setsuflen = copy_option_part(&setsuf, suf_buf, MAXSUFLEN, ".,");
|
||||
if (fnamelen >= setsuflen
|
||||
&& fnamencmp(suf_buf, fname + fnamelen - setsuflen,
|
||||
(size_t)setsuflen) == 0)
|
||||
break;
|
||||
setsuflen = 0;
|
||||
if (setsuflen == 0)
|
||||
{
|
||||
char_u *tail = gettail(fname);
|
||||
|
||||
/* empty entry: match name without a '.' */
|
||||
if (vim_strchr(tail, '.') == NULL)
|
||||
{
|
||||
setsuflen = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (fnamelen >= setsuflen
|
||||
&& fnamencmp(suf_buf, fname + fnamelen - setsuflen,
|
||||
(size_t)setsuflen) == 0)
|
||||
break;
|
||||
setsuflen = 0;
|
||||
}
|
||||
}
|
||||
return (setsuflen != 0);
|
||||
}
|
||||
|
||||
@@ -291,7 +291,6 @@
|
||||
# define HAVE_SETENV
|
||||
# define HAVE_RENAME
|
||||
# endif
|
||||
# define mch_chdir(s) chdir(s)
|
||||
#endif
|
||||
|
||||
#if defined(MACOS_X) && !defined(HAVE_CONFIG_H)
|
||||
|
||||
@@ -2039,6 +2039,12 @@ mch_chdir(char *path)
|
||||
{
|
||||
if (path[0] == NUL) /* just checking... */
|
||||
return 0;
|
||||
if (p_verbose >= 5)
|
||||
{
|
||||
verbose_enter();
|
||||
smsg((char_u *)"chdir(%s)", path);
|
||||
verbose_leave();
|
||||
}
|
||||
if (path[1] == ':') /* has a drive name */
|
||||
{
|
||||
if (change_drive(TOLOWER_ASC(path[0]) - 'a' + 1))
|
||||
|
||||
@@ -653,6 +653,12 @@ mch_chdir(char *path)
|
||||
if (path[0] == NUL) /* just checking... */
|
||||
return -1;
|
||||
|
||||
if (p_verbose >= 5)
|
||||
{
|
||||
verbose_enter();
|
||||
smsg((char_u *)"chdir(%s)", path);
|
||||
verbose_leave();
|
||||
}
|
||||
if (isalpha(path[0]) && path[1] == ':') /* has a drive name */
|
||||
{
|
||||
/* If we can change to the drive, skip that part of the path. If we
|
||||
|
||||
@@ -1203,6 +1203,12 @@ mch_chdir(dir)
|
||||
int retval;
|
||||
char_u *new_dir;
|
||||
|
||||
if (p_verbose >= 5)
|
||||
{
|
||||
verbose_enter();
|
||||
smsg((char_u *)"chdir(%s)", dir);
|
||||
verbose_leave();
|
||||
}
|
||||
length = strlen(dir);
|
||||
if (dir[length - 1] != '.')
|
||||
return chdir(dir); /* No trailing dots - nothing to do. */
|
||||
|
||||
+26
-3
@@ -319,6 +319,23 @@ static struct signalinfo
|
||||
{-1, "Unknown!", FALSE}
|
||||
};
|
||||
|
||||
int
|
||||
mch_chdir(path)
|
||||
char *path;
|
||||
{
|
||||
if (p_verbose >= 5)
|
||||
{
|
||||
verbose_enter();
|
||||
smsg((char_u *)"chdir(%s)", path);
|
||||
verbose_leave();
|
||||
}
|
||||
# ifdef VMS
|
||||
return chdir(vms_fixfilename(path));
|
||||
# else
|
||||
return chdir(path);
|
||||
# endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Write s[len] to the screen.
|
||||
*/
|
||||
@@ -1138,10 +1155,10 @@ mch_suspend()
|
||||
* to happen).
|
||||
*/
|
||||
{
|
||||
long wait;
|
||||
for (wait = 0; !sigcont_received && wait <= 3L; wait++)
|
||||
long wait_time;
|
||||
for (wait_time = 0; !sigcont_received && wait_time <= 3L; wait_time++)
|
||||
/* Loop is not entered most of the time */
|
||||
mch_delay(wait, FALSE);
|
||||
mch_delay(wait_time, FALSE);
|
||||
}
|
||||
# endif
|
||||
|
||||
@@ -2426,6 +2443,12 @@ mch_FullName(fname, buf, len, force)
|
||||
#ifdef HAVE_FCHDIR
|
||||
if (fd >= 0)
|
||||
{
|
||||
if (p_verbose >= 5)
|
||||
{
|
||||
verbose_enter();
|
||||
MSG("fchdir() to previous dir");
|
||||
verbose_leave();
|
||||
}
|
||||
l = fchdir(fd);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
@@ -482,11 +482,6 @@ typedef struct dsc$descriptor DESC;
|
||||
# else
|
||||
int mch_rename __ARGS((const char *src, const char *dest));
|
||||
# endif
|
||||
# ifdef VMS
|
||||
# define mch_chdir(s) chdir(vms_fixfilename(s))
|
||||
# else
|
||||
# define mch_chdir(s) chdir(s)
|
||||
# endif
|
||||
# ifndef VMS
|
||||
# ifdef __MVS__
|
||||
/* on OS390 Unix getenv() doesn't return a pointer to persistent
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* os_unix.c */
|
||||
int mch_chdir __ARGS((char *path));
|
||||
void mch_write __ARGS((char_u *s, int len));
|
||||
int mch_inchar __ARGS((char_u *buf, int maxlen, long wtime, int tb_change_cnt));
|
||||
int mch_char_avail __ARGS((void));
|
||||
|
||||
@@ -691,6 +691,18 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
234,
|
||||
/**/
|
||||
233,
|
||||
/**/
|
||||
232,
|
||||
/**/
|
||||
231,
|
||||
/**/
|
||||
230,
|
||||
/**/
|
||||
229,
|
||||
/**/
|
||||
228,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user