Skip to content

Commit 824b7fa

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 9d23d58 + 2fcf668 commit 824b7fa

File tree

8 files changed

+27
-21
lines changed

8 files changed

+27
-21
lines changed

src/auto/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12146,7 +12146,7 @@ fi
1214612146
for ac_func in fchdir fchown fsync getcwd getpseudotty \
1214712147
getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat \
1214812148
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
12149-
setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
12149+
getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
1215012150
sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
1215112151
strnicmp strpbrk strtol tgetent towlower towupper iswupper \
1215212152
usleep utime utimes

src/config.h.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@
158158
#undef HAVE_FCHOWN
159159
#undef HAVE_FSEEKO
160160
#undef HAVE_FSYNC
161+
#undef HAVE_FLOAT_FUNCS
161162
#undef HAVE_GETCWD
163+
#undef HAVE_GETPGID
162164
#undef HAVE_GETPSEUDOTTY
163165
#undef HAVE_GETPWENT
164166
#undef HAVE_GETPWNAM
@@ -167,13 +169,12 @@
167169
#undef HAVE_GETTIMEOFDAY
168170
#undef HAVE_GETWD
169171
#undef HAVE_ICONV
170-
#undef HAVE_NL_LANGINFO_CODESET
171172
#undef HAVE_LSTAT
172173
#undef HAVE_MEMSET
173174
#undef HAVE_MKDTEMP
174175
#undef HAVE_NANOSLEEP
176+
#undef HAVE_NL_LANGINFO_CODESET
175177
#undef HAVE_OPENDIR
176-
#undef HAVE_FLOAT_FUNCS
177178
#undef HAVE_PUTENV
178179
#undef HAVE_QSORT
179180
#undef HAVE_READLINK

src/configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3694,7 +3694,7 @@ dnl Can only be used for functions that do not require any include.
36943694
AC_CHECK_FUNCS(fchdir fchown fsync getcwd getpseudotty \
36953695
getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat \
36963696
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
3697-
setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
3697+
getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
36983698
sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
36993699
strnicmp strpbrk strtol tgetent towlower towupper iswupper \
37003700
usleep utime utimes)

src/diff.c

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,7 @@ ex_diffpatch(exarg_T *eap)
906906
int browse_flag = cmdmod.browse;
907907
#endif
908908
stat_T st;
909+
char_u *esc_name = NULL;
909910

910911
#ifdef FEAT_BROWSE
911912
if (cmdmod.browse)
@@ -935,11 +936,14 @@ ex_diffpatch(exarg_T *eap)
935936
/* Get the absolute path of the patchfile, changing directory below. */
936937
fullname = FullName_save(eap->arg, FALSE);
937938
#endif
938-
buflen = STRLEN(tmp_orig) + (
939+
esc_name = vim_strsave_shellescape(
939940
# ifdef UNIX
940-
fullname != NULL ? STRLEN(fullname) :
941+
fullname != NULL ? fullname :
941942
# endif
942-
STRLEN(eap->arg)) + STRLEN(tmp_new) + 16;
943+
eap->arg, TRUE, TRUE);
944+
if (esc_name == NULL)
945+
goto theend;
946+
buflen = STRLEN(tmp_orig) + STRLEN(esc_name) + STRLEN(tmp_new) + 16;
943947
buf = alloc((unsigned)buflen);
944948
if (buf == NULL)
945949
goto theend;
@@ -977,17 +981,8 @@ ex_diffpatch(exarg_T *eap)
977981
{
978982
/* Build the patch command and execute it. Ignore errors. Switch to
979983
* cooked mode to allow the user to respond to prompts. */
980-
vim_snprintf((char *)buf, buflen,
981-
#ifdef UNIX
982-
"patch -o %s %s < '%s'",
983-
#else
984-
"patch -o %s %s < \"%s\"",
985-
#endif
986-
tmp_new, tmp_orig,
987-
# ifdef UNIX
988-
fullname != NULL ? fullname :
989-
# endif
990-
eap->arg);
984+
vim_snprintf((char *)buf, buflen, "patch -o %s %s < %s",
985+
tmp_new, tmp_orig, esc_name);
991986
#ifdef FEAT_AUTOCMD
992987
block_autocmds(); /* Avoid ShellCmdPost stuff */
993988
#endif
@@ -1078,6 +1073,7 @@ ex_diffpatch(exarg_T *eap)
10781073
#ifdef UNIX
10791074
vim_free(fullname);
10801075
#endif
1076+
vim_free(esc_name);
10811077
#ifdef FEAT_BROWSE
10821078
vim_free(browseFile);
10831079
cmdmod.browse = browse_flag;

src/os_unix.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3083,7 +3083,7 @@ executable_file(char_u *name)
30833083
}
30843084

30853085
/*
3086-
* Return 1 if "name" can be found in $PATH and executed, 0 if not.
3086+
* Return TRUE if "name" can be found in $PATH and executed, FALSE if not.
30873087
* If "use_path" is FALSE only check if "name" is executable.
30883088
* Return -1 if unknown.
30893089
*/
@@ -5451,8 +5451,10 @@ mch_stop_job(job_T *job, char_u *how)
54515451

54525452
/* TODO: have an option to only kill the process, not the group? */
54535453
job_pid = job->jv_pid;
5454+
#ifdef HAVE_GETPGID
54545455
if (job_pid == getpgid(job_pid))
54555456
job_pid = -job_pid;
5457+
#endif
54565458

54575459
kill(job_pid, sig);
54585460

src/testdir/test3.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,8 @@ break;
970970
/* end of AUTO */
971971

972972
STARTTEST
973-
:set tw=0 wm=60 columns=80 noai fo=croq
973+
:set tw=0 noai fo=croq
974+
:let &wm = &columns - 20
974975
/serious/e
975976
a about life, the universe, and the rest
976977
ENDTEST

src/testdir/test_diffmode.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ func Test_diffpatch()
319319
new
320320
call assert_fails('diffpatch Xpatch', 'E816:')
321321

322-
for name in ['Xpatch', 'Xpatch$HOME']
322+
for name in ['Xpatch', 'Xpatch$HOME', 'Xpa''tch']
323323
call setline(1, ['1', '2', '3'])
324324
if name != 'Xpatch'
325325
call rename('Xpatch', name)

src/version.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,12 @@ static char *(features[]) =
779779

780780
static int included_patches[] =
781781
{ /* Add new patch number below this line */
782+
/**/
783+
445,
784+
/**/
785+
444,
786+
/**/
787+
443,
782788
/**/
783789
442,
784790
/**/

0 commit comments

Comments
 (0)