diff --git a/src/edit.c b/src/edit.c index 15266c8056..762c515d8e 100644 --- a/src/edit.c +++ b/src/edit.c @@ -1620,7 +1620,12 @@ ins_redraw( # endif # ifdef FEAT_AUTOCMD if (has_cursormovedI()) + { + /* Make sure curswant is correct, an autocommand may call + * getcurpos(). */ + update_curswant(); apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf); + } # endif # ifdef FEAT_CONCEAL if (curwin->w_p_cole > 0) diff --git a/src/eval.c b/src/eval.c index c40fd9ef2f..78ade2d0e4 100644 --- a/src/eval.c +++ b/src/eval.c @@ -21633,8 +21633,12 @@ get_tv_string_buf_chk(typval_T *varp, char_u *buf) # ifdef UNIX vim_snprintf((char *)buf, NUMBUFLEN, "process %ld %s", (long)job->jv_pid, status); +# elif defined(WIN32) + vim_snprintf((char *)buf, NUMBUFLEN, + "process %ld %s", (long)job->jf_pi.dwProcessId, + status); # else - /* TODO */ + /* fall-back */ vim_snprintf((char *)buf, NUMBUFLEN, "process ? %s", status); # endif return buf; diff --git a/src/os_unix.c b/src/os_unix.c index a669c6a008..21406e9bce 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -3926,6 +3926,11 @@ wait4pid(pid_t child, waitstatus *status) } #if defined(FEAT_JOB) || !defined(USE_SYSTEM) || defined(PROTO) +/* + * Parse "cmd" and put the white-separated parts in "argv". + * "argv" is an allocated array with "argc" entries. + * Returns FAIL when out of memory. + */ int mch_parse_cmd(char_u *cmd, int use_shcf, char ***argv, int *argc) { @@ -5129,7 +5134,8 @@ mch_stop_job(job_T *job, char_u *how) sig = atoi((char *)how); else return FAIL; - kill(job->jv_pid, sig); + /* TODO: have an option to only kill the process, not the group? */ + kill(-job->jv_pid, sig); return OK; } #endif diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim index 7d82094f21..432171d9b4 100644 --- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -23,6 +23,7 @@ else endif let s:port = -1 +let s:chopt = has('macunix') ? {'waittime' : 1} : {} func s:start_server() " The Python program writes the port number in Xportnr. @@ -60,7 +61,7 @@ func s:start_server() endif let s:port = l[0] - let handle = ch_open('localhost:' . s:port) + let handle = ch_open('localhost:' . s:port, s:chopt) return handle endfunc @@ -155,7 +156,7 @@ func Test_two_channels() endif call assert_equal('got it', ch_sendexpr(handle, 'hello!')) - let newhandle = ch_open('localhost:' . s:port) + let newhandle = ch_open('localhost:' . s:port, s:chopt) call assert_equal('got it', ch_sendexpr(newhandle, 'hello!')) call assert_equal('got it', ch_sendexpr(handle, 'hello!')) @@ -181,7 +182,7 @@ endfunc " Test that trying to connect to a non-existing port fails quickly. func Test_connect_waittime() let start = reltime() - let handle = ch_open('localhost:9876') + let handle = ch_open('localhost:9876', s:chopt) if handle >= 0 " Oops, port does exists. call ch_close(handle) diff --git a/src/version.c b/src/version.c index 7a289584d1..444de71d18 100644 --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,14 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1297, +/**/ + 1296, +/**/ + 1295, +/**/ + 1294, /**/ 1293, /**/