Compare commits

...

3 Commits

Author SHA1 Message Date
Bram Moolenaar
c4e4198730 updated for version 7.2.339
Problem:    Part of --startuptime patch is missing.
Solution:   Add check for time_fd.
2010-01-19 16:31:47 +01:00
Bram Moolenaar
6b29b0e809 updated for version 7.2.338
Problem:    Part of FD_CLOEXEC change is missing.
Solution:   Include source file skipped because of typo.
2010-01-19 16:22:03 +01:00
Bram Moolenaar
3d63e3f160 updated for version 7.2.337
Problem:    The :compiler command doesn't function properly when invoked in a
            function.
Solution:   Add "g:" before "current_compiler". (Yukihiro Nakadaira)
2010-01-19 16:13:50 +01:00
2 changed files with 40 additions and 14 deletions

View File

@@ -2496,14 +2496,15 @@ ex_compiler(eap)
* To remain backwards compatible "current_compiler" is always
* used. A user's compiler plugin may set it, the distributed
* plugin will then skip the settings. Afterwards set
* "b:current_compiler" and restore "current_compiler". */
old_cur_comp = get_var_value((char_u *)"current_compiler");
* "b:current_compiler" and restore "current_compiler".
* Explicitly prepend "g:" to make it work in a function. */
old_cur_comp = get_var_value((char_u *)"g:current_compiler");
if (old_cur_comp != NULL)
old_cur_comp = vim_strsave(old_cur_comp);
do_cmdline_cmd((char_u *)
"command -nargs=* CompilerSet setlocal <args>");
}
do_unlet((char_u *)"current_compiler", TRUE);
do_unlet((char_u *)"g:current_compiler", TRUE);
do_unlet((char_u *)"b:current_compiler", TRUE);
sprintf((char *)buf, "compiler/%s.vim", eap->arg);
@@ -2514,7 +2515,7 @@ ex_compiler(eap)
do_cmdline_cmd((char_u *)":delcommand CompilerSet");
/* Set "b:current_compiler" from "current_compiler". */
p = get_var_value((char_u *)"current_compiler");
p = get_var_value((char_u *)"g:current_compiler");
if (p != NULL)
set_internal_string_var((char_u *)"b:current_compiler", p);
@@ -2523,12 +2524,12 @@ ex_compiler(eap)
{
if (old_cur_comp != NULL)
{
set_internal_string_var((char_u *)"current_compiler",
set_internal_string_var((char_u *)"g:current_compiler",
old_cur_comp);
vim_free(old_cur_comp);
}
else
do_unlet((char_u *)"current_compiler", TRUE);
do_unlet((char_u *)"g:current_compiler", TRUE);
}
}
}
@@ -2801,20 +2802,35 @@ source_level(cookie)
static char_u *get_one_sourceline __ARGS((struct source_cookie *sp));
#if defined(WIN32) && defined(FEAT_CSCOPE)
#if (defined(WIN32) && defined(FEAT_CSCOPE)) || defined(HAVE_FD_CLOEXEC)
# define USE_FOPEN_NOINH
static FILE *fopen_noinh_readbin __ARGS((char *filename));
/*
* Special function to open a file without handle inheritance.
* When possible the handle is closed on exec().
*/
static FILE *
fopen_noinh_readbin(filename)
char *filename;
{
int fd_tmp = mch_open(filename, O_RDONLY | O_BINARY | O_NOINHERIT, 0);
int fd_tmp = mch_open(filename, O_RDONLY
# ifdef WIN32
O_BINARY | O_NOINHERIT
# endif
, 0);
if (fd_tmp == -1)
return NULL;
# ifdef HAVE_FD_CLOEXEC
{
int fdflags = fcntl(fd_tmp, F_GETFD);
if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0)
fcntl(fd_tmp, F_SETFD, fdflags | FD_CLOEXEC);
}
# endif
return fdopen(fd_tmp, READBIN);
}
#endif
@@ -2894,7 +2910,7 @@ do_source(fname, check_other, is_vimrc)
apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf);
#endif
#if defined(WIN32) && defined(FEAT_CSCOPE)
#ifdef USE_FOPEN_NOINH
cookie.fp = fopen_noinh_readbin((char *)fname_exp);
#else
cookie.fp = mch_fopen((char *)fname_exp, READBIN);
@@ -2915,7 +2931,7 @@ do_source(fname, check_other, is_vimrc)
*p = '.';
else
*p = '_';
#if defined(WIN32) && defined(FEAT_CSCOPE)
#ifdef USE_FOPEN_NOINH
cookie.fp = fopen_noinh_readbin((char *)fname_exp);
#else
cookie.fp = mch_fopen((char *)fname_exp, READBIN);
@@ -3020,7 +3036,8 @@ do_source(fname, check_other, is_vimrc)
#endif
#ifdef STARTUPTIME
time_push(&tv_rel, &tv_start);
if (time_fd != NULL)
time_push(&tv_rel, &tv_start);
#endif
#ifdef FEAT_EVAL
@@ -3146,9 +3163,12 @@ do_source(fname, check_other, is_vimrc)
verbose_leave();
}
#ifdef STARTUPTIME
vim_snprintf((char *)IObuff, IOSIZE, "sourcing %s", fname);
time_msg((char *)IObuff, &tv_start);
time_pop(&tv_rel);
if (time_fd != NULL)
{
vim_snprintf((char *)IObuff, IOSIZE, "sourcing %s", fname);
time_msg((char *)IObuff, &tv_start);
time_pop(&tv_rel);
}
#endif
#ifdef FEAT_EVAL

View File

@@ -681,6 +681,12 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
339,
/**/
338,
/**/
337,
/**/
336,
/**/