Skip to content

Commit 1227fce

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 374f09f + a483326 commit 1227fce

5 files changed

Lines changed: 29 additions & 5 deletions

File tree

src/edit.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,7 +1620,12 @@ ins_redraw(
16201620
# endif
16211621
# ifdef FEAT_AUTOCMD
16221622
if (has_cursormovedI())
1623+
{
1624+
/* Make sure curswant is correct, an autocommand may call
1625+
* getcurpos(). */
1626+
update_curswant();
16231627
apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf);
1628+
}
16241629
# endif
16251630
# ifdef FEAT_CONCEAL
16261631
if (curwin->w_p_cole > 0)

src/eval.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21633,8 +21633,12 @@ get_tv_string_buf_chk(typval_T *varp, char_u *buf)
2163321633
# ifdef UNIX
2163421634
vim_snprintf((char *)buf, NUMBUFLEN,
2163521635
"process %ld %s", (long)job->jv_pid, status);
21636+
# elif defined(WIN32)
21637+
vim_snprintf((char *)buf, NUMBUFLEN,
21638+
"process %ld %s", (long)job->jf_pi.dwProcessId,
21639+
status);
2163621640
# else
21637-
/* TODO */
21641+
/* fall-back */
2163821642
vim_snprintf((char *)buf, NUMBUFLEN, "process ? %s", status);
2163921643
# endif
2164021644
return buf;

src/os_unix.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3926,6 +3926,11 @@ wait4pid(pid_t child, waitstatus *status)
39263926
}
39273927

39283928
#if defined(FEAT_JOB) || !defined(USE_SYSTEM) || defined(PROTO)
3929+
/*
3930+
* Parse "cmd" and put the white-separated parts in "argv".
3931+
* "argv" is an allocated array with "argc" entries.
3932+
* Returns FAIL when out of memory.
3933+
*/
39293934
int
39303935
mch_parse_cmd(char_u *cmd, int use_shcf, char ***argv, int *argc)
39313936
{
@@ -5129,7 +5134,8 @@ mch_stop_job(job_T *job, char_u *how)
51295134
sig = atoi((char *)how);
51305135
else
51315136
return FAIL;
5132-
kill(job->jv_pid, sig);
5137+
/* TODO: have an option to only kill the process, not the group? */
5138+
kill(-job->jv_pid, sig);
51335139
return OK;
51345140
}
51355141
#endif

src/testdir/test_channel.vim

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ else
2323
endif
2424

2525
let s:port = -1
26+
let s:chopt = has('macunix') ? {'waittime' : 1} : {}
2627

2728
func s:start_server()
2829
" The Python program writes the port number in Xportnr.
@@ -60,7 +61,7 @@ func s:start_server()
6061
endif
6162
let s:port = l[0]
6263

63-
let handle = ch_open('localhost:' . s:port)
64+
let handle = ch_open('localhost:' . s:port, s:chopt)
6465
return handle
6566
endfunc
6667

@@ -155,7 +156,7 @@ func Test_two_channels()
155156
endif
156157
call assert_equal('got it', ch_sendexpr(handle, 'hello!'))
157158

158-
let newhandle = ch_open('localhost:' . s:port)
159+
let newhandle = ch_open('localhost:' . s:port, s:chopt)
159160
call assert_equal('got it', ch_sendexpr(newhandle, 'hello!'))
160161
call assert_equal('got it', ch_sendexpr(handle, 'hello!'))
161162

@@ -181,7 +182,7 @@ endfunc
181182
" Test that trying to connect to a non-existing port fails quickly.
182183
func Test_connect_waittime()
183184
let start = reltime()
184-
let handle = ch_open('localhost:9876')
185+
let handle = ch_open('localhost:9876', s:chopt)
185186
if handle >= 0
186187
" Oops, port does exists.
187188
call ch_close(handle)

src/version.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,14 @@ static char *(features[]) =
762762

763763
static int included_patches[] =
764764
{ /* Add new patch number below this line */
765+
/**/
766+
1297,
767+
/**/
768+
1296,
769+
/**/
770+
1295,
771+
/**/
772+
1294,
765773
/**/
766774
1293,
767775
/**/

0 commit comments

Comments
 (0)