Compare commits

...

4 Commits

Author SHA1 Message Date
Bram Moolenaar
f9ddb94283 updated for version 7.2.428
Problem:    Using setqflist([]) to clear the error list doesn't work properly.
Solution:   Set qf_nonevalid to TRUE when appropriate. (Christian Brabandt)
2010-05-14 18:10:27 +02:00
Bram Moolenaar
9dbe4758b1 updated for version 7.2.427
Problem:    The swapfile is created using the destination of a symlink, but
            recovery doesn't follow symlinks.
Solution:   When recovering, resolve symlinks. (James Vega)
2010-05-14 17:52:42 +02:00
Bram Moolenaar
6af0506370 updated for version 7.2.426
Problem:    Commas in 'langmap' are not always handled correctly.
Solution:   Require commas to be backslash escaped. (James Vega)
2010-05-14 17:32:58 +02:00
Bram Moolenaar
2321c9255e updated for version 7.2.425
Problem:    Some compilers complain about fourth EX() argument.
Solution:   Add cast to long_u.
2010-05-14 15:42:53 +02:00
5 changed files with 56 additions and 34 deletions

View File

@@ -74,7 +74,7 @@ typedef struct exarg exarg_T;
# undef EX /* just in case */
#endif
#ifdef DO_DECLARE_EXCMD
# define EX(a, b, c, d) {(char_u *)b, c, d}
# define EX(a, b, c, d) {(char_u *)b, c, (long_u)(d)}
typedef void (*ex_func_T) __ARGS((exarg_T *eap));

View File

@@ -245,6 +245,9 @@ static char_u *make_percent_swname __ARGS((char_u *dir, char_u *name));
#ifdef FEAT_BYTEOFF
static void ml_updatechunk __ARGS((buf_T *buf, long line, long len, int updtype));
#endif
#ifdef HAVE_READLINK
static int resolve_symlink __ARGS((char_u *fname, char_u *buf));
#endif
/*
* Open a new memline for "buf".
@@ -1401,10 +1404,19 @@ recover_names(fname, list, nr)
int i;
char_u *dirp;
char_u *dir_name;
char_u *fname_res = *fname;
#ifdef HAVE_READLINK
char_u fname_buf[MAXPATHL];
/* Expand symlink in the file name, because the swap file is created with
* the actual file instead of with the symlink. */
if (resolve_symlink(*fname, fname_buf) == OK)
fname_res = fname_buf;
#endif
if (list)
{
/* use msg() to start the scrolling properly */
/* use msg() to start the scrolling properly */
msg((char_u *)_("Swap files found:"));
msg_putchar('\n');
}
@@ -1453,7 +1465,7 @@ recover_names(fname, list, nr)
#endif
}
else
num_names = recov_file_names(names, *fname, TRUE);
num_names = recov_file_names(names, fname_res, TRUE);
}
else /* check directory dir_name */
{
@@ -1490,12 +1502,12 @@ recover_names(fname, list, nr)
if (after_pathsep(dir_name, p) && p[-1] == p[-2])
{
/* Ends with '//', Use Full path for swap name */
tail = make_percent_swname(dir_name, *fname);
tail = make_percent_swname(dir_name, fname_res);
}
else
#endif
{
tail = gettail(*fname);
tail = gettail(fname_res);
tail = concat_fnames(dir_name, tail, TRUE);
}
if (tail == NULL)
@@ -1535,11 +1547,13 @@ recover_names(fname, list, nr)
struct stat st;
char_u *swapname;
swapname = modname(fname_res,
#if defined(VMS) || defined(RISCOS)
swapname = modname(*fname, (char_u *)"_swp", FALSE);
(char_u *)"_swp", FALSE
#else
swapname = modname(*fname, (char_u *)".swp", TRUE);
(char_u *)".swp", TRUE
#endif
);
if (swapname != NULL)
{
if (mch_stat((char *)swapname, &st) != -1) /* It exists! */
@@ -3508,8 +3522,6 @@ ml_lineadd(buf, count)
}
#ifdef HAVE_READLINK
static int resolve_symlink __ARGS((char_u *fname, char_u *buf));
/*
* Resolve a symlink in the last component of a file name.
* Note that f_resolve() does it for every part of the path, we don't do that
@@ -3601,9 +3613,9 @@ makeswapname(fname, ffname, buf, dir_name)
char_u *dir_name;
{
char_u *r, *s;
char_u *fname_res = fname;
#ifdef HAVE_READLINK
char_u fname_buf[MAXPATHL];
char_u *fname_res;
#endif
#if defined(UNIX) || defined(WIN3264) /* Need _very_ long file names */
@@ -3625,8 +3637,6 @@ makeswapname(fname, ffname, buf, dir_name)
* actual file instead of with the symlink. */
if (resolve_symlink(fname, fname_buf) == OK)
fname_res = fname_buf;
else
fname_res = fname;
#endif
r = buf_modname(
@@ -3639,11 +3649,7 @@ makeswapname(fname, ffname, buf, dir_name)
/* Avoid problems if fname has special chars, eg <Wimp$Scrap> */
ffname,
#else
# ifdef HAVE_READLINK
fname_res,
# else
fname,
# endif
#endif
(char_u *)
#if defined(VMS) || defined(RISCOS)

View File

@@ -10432,6 +10432,11 @@ langmap_set()
p2 = NULL; /* aAbBcCdD form, p2 is NULL */
while (p[0])
{
if (p[0] == ',')
{
++p;
break;
}
if (p[0] == '\\' && p[1] != NUL)
++p;
#ifdef FEAT_MBYTE
@@ -10439,26 +10444,33 @@ langmap_set()
#else
from = p[0];
#endif
to = NUL;
if (p2 == NULL)
{
mb_ptr_adv(p);
if (p[0] == '\\')
++p;
if (p[0] != ',')
{
if (p[0] == '\\')
++p;
#ifdef FEAT_MBYTE
to = (*mb_ptr2char)(p);
to = (*mb_ptr2char)(p);
#else
to = p[0];
to = p[0];
#endif
}
}
else
{
if (p2[0] == '\\')
++p2;
if (p2[0] != ',')
{
if (p2[0] == '\\')
++p2;
#ifdef FEAT_MBYTE
to = (*mb_ptr2char)(p2);
to = (*mb_ptr2char)(p2);
#else
to = p2[0];
to = p2[0];
#endif
}
}
if (to == NUL)
{
@@ -10476,15 +10488,7 @@ langmap_set()
/* Advance to next pair */
mb_ptr_adv(p);
if (p2 == NULL)
{
if (p[0] == ',')
{
++p;
break;
}
}
else
if (p2 != NULL)
{
mb_ptr_adv(p2);
if (*p == ';')

View File

@@ -3654,7 +3654,11 @@ set_errorlist(wp, list, action)
}
}
qi->qf_lists[qi->qf_curlist].qf_nonevalid = FALSE;
if (qi->qf_lists[qi->qf_curlist].qf_index == 0)
/* empty list or no valid entry */
qi->qf_lists[qi->qf_curlist].qf_nonevalid = TRUE;
else
qi->qf_lists[qi->qf_curlist].qf_nonevalid = FALSE;
qi->qf_lists[qi->qf_curlist].qf_ptr = qi->qf_lists[qi->qf_curlist].qf_start;
qi->qf_lists[qi->qf_curlist].qf_index = 1;

View File

@@ -681,6 +681,14 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
428,
/**/
427,
/**/
426,
/**/
425,
/**/
424,
/**/