From 9d954207e2cc807b475bb04f8b59ef5bb3772d99 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 4 Sep 2017 20:34:19 +0200 Subject: [PATCH 01/12] patch 8.0.1053: setline() does not work on startup Problem: setline() does not work on startup. (Manuel Ortega) Solution: Do not check for ml_mfp to be set for the current buffer. (Christian Brabandt) --- src/evalfunc.c | 5 ++++- src/testdir/shared.vim | 14 ++++++++++---- src/testdir/test_alot.vim | 2 ++ src/testdir/test_bufline.vim | 13 +++++++++++++ src/testdir/test_timers.vim | 2 -- src/version.c | 2 ++ 6 files changed, 31 insertions(+), 7 deletions(-) diff --git a/src/evalfunc.c b/src/evalfunc.c index 2692de61f4..cf9c8d8ec3 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -9885,7 +9885,10 @@ set_buffer_lines(buf_T *buf, linenr_T lnum, typval_T *lines, typval_T *rettv) buf_T *curbuf_save; int is_curbuf = buf == curbuf; - if (buf == NULL || buf->b_ml.ml_mfp == NULL || lnum < 1) + /* When using the current buffer ml_mfp will be set if needed. Useful when + * setline() is used on startup. For other buffers the buffer must be + * loaded. */ + if (buf == NULL || (!is_curbuf && buf->b_ml.ml_mfp == NULL) || lnum < 1) { rettv->vval.v_number = 1; /* FAIL */ return; diff --git a/src/testdir/shared.vim b/src/testdir/shared.vim index a305c90cb6..691199a97c 100644 --- a/src/testdir/shared.vim +++ b/src/testdir/shared.vim @@ -166,15 +166,21 @@ func s:feedkeys(timer) endfunc " Get the command to run Vim, with -u NONE and --not-a-term arguments. +" If there is an argument use it instead of "NONE". " Returns an empty string on error. -func GetVimCommand() +func GetVimCommand(...) if !filereadable('vimcmd') return '' endif + if a:0 == 0 + let name = 'NONE' + else + let name = a:1 + endif let cmd = readfile('vimcmd')[0] - let cmd = substitute(cmd, '-u \f\+', '-u NONE', '') - if cmd !~ '-u NONE' - let cmd = cmd . ' -u NONE' + let cmd = substitute(cmd, '-u \f\+', '-u ' . name, '') + if cmd !~ '-u '. name + let cmd = cmd . ' -u ' . name endif let cmd .= ' --not-a-term' let cmd = substitute(cmd, 'VIMRUNTIME=.*VIMRUNTIME;', '', '') diff --git a/src/testdir/test_alot.vim b/src/testdir/test_alot.vim index 189cd82d12..61c3472b2a 100644 --- a/src/testdir/test_alot.vim +++ b/src/testdir/test_alot.vim @@ -1,6 +1,8 @@ " A series of tests that can run in one Vim invocation. " This makes testing go faster, since Vim doesn't need to restart. +source shared.vim + set belloff=all source test_assign.vim source test_bufline.vim diff --git a/src/testdir/test_bufline.vim b/src/testdir/test_bufline.vim index 7df36aa6a2..2fe6739ed3 100644 --- a/src/testdir/test_bufline.vim +++ b/src/testdir/test_bufline.vim @@ -24,3 +24,16 @@ func Test_setbufline_getbufline() call assert_equal([], getbufline(b, 6)) exe "bwipe! " . b endfunc + +func Test_setline_startup() + let cmd = GetVimCommand('Xscript') + if cmd == '' + return + endif + call writefile(['call setline(1, "Hello")', 'w Xtest', 'q!'], 'Xscript') + call system(cmd) + call assert_equal(['Hello'], readfile('Xtest')) + + call delete('Xscript') + call delete('Xtest') +endfunc diff --git a/src/testdir/test_timers.vim b/src/testdir/test_timers.vim index 0c6bb8338f..142bfc8a54 100644 --- a/src/testdir/test_timers.vim +++ b/src/testdir/test_timers.vim @@ -1,7 +1,5 @@ " Test for timers -source shared.vim - if !has('timers') finish endif diff --git a/src/version.c b/src/version.c index 2b30a090f1..5f49b381f4 100644 --- a/src/version.c +++ b/src/version.c @@ -769,6 +769,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1053, /**/ 1052, /**/ From 178333783fac3a5edbc86f2e9c57a21c41f05697 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 4 Sep 2017 22:23:19 +0200 Subject: [PATCH 02/12] patch 8.0.1054: terminal test fails on MS-Windows Problem: Terminal test fails on MS-Windows. Solution: Disable the redirection test for now. Improve scrape test to make it less flaky. --- src/testdir/test_terminal.vim | 19 ++++++++++++------- src/version.c | 2 ++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index dce5f05cd1..c7ff89ee67 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -165,7 +165,9 @@ func Test_terminal_scrape_123() call term_wait(buf) let g:buf = buf - call WaitFor('len(term_scrape(g:buf, 1)) > 0') + " On MS-Windows we first get a startup message of two lines, wait for the + " "cls" to happen, after that we have one line. + call WaitFor('len(term_scrape(g:buf, 1)) == 1') call Check_123(buf) " Must still work after the job ended. @@ -590,12 +592,15 @@ func Test_terminal_wrong_options() endfunc func Test_terminal_redir_file() - let cmd = Get_cat_123_cmd() - let buf = term_start(cmd, {'out_io': 'file', 'out_name': 'Xfile'}) - call term_wait(buf) - call WaitFor('len(readfile("Xfile")) > 0') - call assert_match('123', readfile('Xfile')[0]) - call delete('Xfile') + " TODO: this should work on MS-Window + if has('unix') + let cmd = Get_cat_123_cmd() + let buf = term_start(cmd, {'out_io': 'file', 'out_name': 'Xfile'}) + call term_wait(buf) + call WaitFor('len(readfile("Xfile")) > 0') + call assert_match('123', readfile('Xfile')[0]) + call delete('Xfile') + endif if has('unix') let buf = term_start('xyzabc', {'err_io': 'file', 'err_name': 'Xfile'}) diff --git a/src/version.c b/src/version.c index 5f49b381f4..7f7002c8a4 100644 --- a/src/version.c +++ b/src/version.c @@ -769,6 +769,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1054, /**/ 1053, /**/ From 11aa62f8f949bb590b4d7792a334885fba5e4137 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 4 Sep 2017 22:56:01 +0200 Subject: [PATCH 03/12] patch 8.0.1055: bufline test hangs on MS-Windows Problem: Bufline test hangs on MS-Windows. Solution: Avoid message for writing file. Source shared.vim when running test individually. --- src/testdir/test_bufline.vim | 6 +++++- src/testdir/test_timers.vim | 4 ++++ src/version.c | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/testdir/test_bufline.vim b/src/testdir/test_bufline.vim index 2fe6739ed3..f57dd73ef3 100644 --- a/src/testdir/test_bufline.vim +++ b/src/testdir/test_bufline.vim @@ -1,5 +1,9 @@ " Tests for setbufline() and getbufline() +if !exists('*GetVimCommand') + source shared.vim +endif + func Test_setbufline_getbufline() new let b = bufnr('%') @@ -30,7 +34,7 @@ func Test_setline_startup() if cmd == '' return endif - call writefile(['call setline(1, "Hello")', 'w Xtest', 'q!'], 'Xscript') + call writefile(['call setline(1, "Hello")', 'silent w Xtest', 'q!'], 'Xscript') call system(cmd) call assert_equal(['Hello'], readfile('Xtest')) diff --git a/src/testdir/test_timers.vim b/src/testdir/test_timers.vim index 142bfc8a54..c9171b7b96 100644 --- a/src/testdir/test_timers.vim +++ b/src/testdir/test_timers.vim @@ -4,6 +4,10 @@ if !has('timers') finish endif +if !exists('*WaitFor') + source shared.vim +endif + func MyHandler(timer) let g:val += 1 endfunc diff --git a/src/version.c b/src/version.c index 7f7002c8a4..d15565f0ad 100644 --- a/src/version.c +++ b/src/version.c @@ -769,6 +769,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1055, /**/ 1054, /**/ From 6e32f615eb824048a98666d1da4416bbeb7b2bed Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 4 Sep 2017 23:21:07 +0200 Subject: [PATCH 04/12] patch 8.0.1056: cannot build with +diff but without +multi_byte Problem: Cannot build with the diff feature but without the mutli-byte feature. Solution: Remove #ifdefs. (John Marriott) --- src/diff.c | 4 ---- src/version.c | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/diff.c b/src/diff.c index 0e352d8938..11952c7433 100644 --- a/src/diff.c +++ b/src/diff.c @@ -1702,9 +1702,7 @@ diff_equal_char(char_u *p1, char_u *p2, int *len) diff_cmp(char_u *s1, char_u *s2) { char_u *p1, *p2; -#ifdef FEAT_MBYTE int l; -#endif if ((diff_flags & (DIFF_ICASE | DIFF_IWHITE)) == 0) return STRCMP(s1, s2); @@ -1983,10 +1981,8 @@ diff_find_change( int idx; int off; int added = TRUE; -#ifdef FEAT_MBYTE char_u *p1, *p2; int l; -#endif /* Make a copy of the line, the next ml_get() will invalidate it. */ line_org = vim_strsave(ml_get_buf(wp->w_buffer, lnum, FALSE)); diff --git a/src/version.c b/src/version.c index d15565f0ad..652704c1b7 100644 --- a/src/version.c +++ b/src/version.c @@ -769,6 +769,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1056, /**/ 1055, /**/ From 1bfdc07a4996b5905b4971e18a6487a18e6461a4 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 5 Sep 2017 20:19:42 +0200 Subject: [PATCH 05/12] patch 8.0.1057: terminal scrape test waits too long Problem: Terminal scrape test waits too long, it checks for one instead of three. Solution: Check there are three characters. (micbou) --- src/testdir/test_terminal.vim | 4 ++-- src/version.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index c7ff89ee67..2ee25bf7c7 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -166,8 +166,8 @@ func Test_terminal_scrape_123() call term_wait(buf) let g:buf = buf " On MS-Windows we first get a startup message of two lines, wait for the - " "cls" to happen, after that we have one line. - call WaitFor('len(term_scrape(g:buf, 1)) == 1') + " "cls" to happen, after that we have one line with three characters. + call WaitFor('len(term_scrape(g:buf, 1)) == 3') call Check_123(buf) " Must still work after the job ended. diff --git a/src/version.c b/src/version.c index 652704c1b7..8fa740d784 100644 --- a/src/version.c +++ b/src/version.c @@ -769,6 +769,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1057, /**/ 1056, /**/ From 8b53b79ea5304c7714cbb873210c82aa3fc8772f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 5 Sep 2017 20:29:25 +0200 Subject: [PATCH 06/12] patch 8.0.1058: terminal redirection test is flaky Problem: Terminal redirection test is flaky. Solution: Wait for job to finish. --- src/testdir/test_terminal.vim | 2 ++ src/version.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index 2ee25bf7c7..800567920d 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -614,6 +614,8 @@ func Test_terminal_redir_file() call term_wait(buf) call WaitFor('term_getline(' . buf . ', 1) == "one line"') call assert_equal('one line', term_getline(buf, 1)) + let g:job = term_getjob(buf) + call WaitFor('job_status(g:job) == "dead"') bwipe call delete('Xfile') endif diff --git a/src/version.c b/src/version.c index 8fa740d784..79ce0e0426 100644 --- a/src/version.c +++ b/src/version.c @@ -769,6 +769,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1058, /**/ 1057, /**/ From 3d8d2c7ca5dda5bfd62c6d5df6659cf62e960a3d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 5 Sep 2017 21:57:27 +0200 Subject: [PATCH 07/12] patch 8.0.1059: older Gnome terminal returns smaller version number Problem: older Gnome terminal returns smaller version number. (antarestrue) Solution: Lower version limit from 2800 to 2500. (#2032) --- src/term.c | 6 +++--- src/version.c | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/term.c b/src/term.c index 413d4bb88d..7fa08c3dbd 100644 --- a/src/term.c +++ b/src/term.c @@ -4572,12 +4572,12 @@ check_termcode( && STRNCMP(tp + extra - 2, "1;95;0c", 7) == 0) is_not_xterm = TRUE; # endif - /* Gnome terminal sends 1;3801;0 or 1;4402;0. + /* Gnome terminal sends 1;3801;0, 1;4402;0 or 1;2501;0. * xfce4-terminal sends 1;2802;0. * screen sends 83;40500;0 - * Assuming any version number over 2800 is not an + * Assuming any version number over 2500 is not an * xterm (without the limit for rxvt and screen). */ - if (col >= 2800) + if (col >= 2500) is_not_xterm = TRUE; /* PuTTY sends 0;136;0 */ diff --git a/src/version.c b/src/version.c index 79ce0e0426..61b5b94dd1 100644 --- a/src/version.c +++ b/src/version.c @@ -769,6 +769,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1059, /**/ 1058, /**/ From 3971905bac0fe7e7519b35b1e558b4f1de55708d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 5 Sep 2017 22:20:46 +0200 Subject: [PATCH 08/12] patch 8.0.1060: when imstyle is one, mapping breaks preediting Problem: When imstyle is one, mapping breaks preediting. Solution: Pass though preediting key-events. (Yasuhiro Matsumoto, closes #2064, closes #2063) --- src/getchar.c | 7 ++++++- src/mbyte.c | 6 +++++- src/version.c | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/getchar.c b/src/getchar.c index 78bd39d81b..63d6542bfe 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -1598,8 +1598,13 @@ vgetc(void) { int did_inc = FALSE; - if (mod_mask) /* no mapping after modifier has been read */ + if (mod_mask +#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK) + || im_is_preediting() +#endif + ) { + /* no mapping after modifier has been read */ ++no_mapping; ++allow_keys; did_inc = TRUE; /* mod_mask may change value */ diff --git a/src/mbyte.c b/src/mbyte.c index 617a97d0ea..f279bdef78 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -4964,7 +4964,11 @@ im_delete_preedit(void) return; } - if (State & NORMAL) + if (State & NORMAL +#ifdef FEAT_TERMINAL + && !term_use_loop() +#endif + ) { im_preedit_cursor = 0; return; diff --git a/src/version.c b/src/version.c index 61b5b94dd1..86a170b730 100644 --- a/src/version.c +++ b/src/version.c @@ -769,6 +769,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1060, /**/ 1059, /**/ From 6756c7037f07e1fb54e1b9d8e92567ac388617c4 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 5 Sep 2017 23:01:12 +0200 Subject: [PATCH 09/12] patch 8.0.1061: Coverity: no check for NULL command Problem: Coverity: no check for NULL command. Solution: Check for NULL list item. --- src/terminal.c | 12 ++++++++---- src/version.c | 2 ++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/terminal.c b/src/terminal.c index 9660c64ba7..b3f5f0af1c 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -38,7 +38,9 @@ * in tl_scrollback are no longer used. * * TODO: - * - ":term NONE" does not work in MS-Windows. + * - ":term NONE" does not work on MS-Windows. + * https://github.com/vim/vim/pull/2056 + * - Redirecting output does not work on MS-Windows. * - implement term_setsize() * - add test for giving error for invalid 'termsize' value. * - support minimal size when 'termsize' is "rows*cols". @@ -56,6 +58,8 @@ * - In the GUI use a terminal emulator for :!cmd. * - Copy text in the vterm to the Vim buffer once in a while, so that * completion works. + * - add an optional limit for the scrollback size. When reaching it remove + * 10% at the start. */ #include "vim.h" @@ -366,10 +370,10 @@ term_start(typval_T *argvar, jobopt_T *opt, int forceit) } else if (argvar->v_type != VAR_LIST || argvar->vval.v_list == NULL - || argvar->vval.v_list->lv_len < 1) + || argvar->vval.v_list->lv_len < 1 + || (cmd = get_tv_string_chk( + &argvar->vval.v_list->lv_first->li_tv)) == NULL) cmd = (char_u*)""; - else - cmd = get_tv_string_chk(&argvar->vval.v_list->lv_first->li_tv); len = STRLEN(cmd) + 10; p = alloc((int)len); diff --git a/src/version.c b/src/version.c index 86a170b730..741536e2ff 100644 --- a/src/version.c +++ b/src/version.c @@ -769,6 +769,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1061, /**/ 1060, /**/ From c3f81394eff2b3edc7ea08405743f0d32048374a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 5 Sep 2017 23:29:34 +0200 Subject: [PATCH 10/12] patch 8.0.1062: Coverity warnings in libvterm Problem: Coverity warnings in libvterm. Solution: Add (void) to avoid warning for not checking return value. Add "break" before "case". --- src/libvterm/src/screen.c | 2 +- src/libvterm/src/state.c | 1 + src/version.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libvterm/src/screen.c b/src/libvterm/src/screen.c index a174e8657c..8d6218f67d 100644 --- a/src/libvterm/src/screen.c +++ b/src/libvterm/src/screen.c @@ -214,7 +214,7 @@ static int moverect_internal(VTermRect dest, VTermRect src, void *user) VTermPos pos; for(pos.row = 0; pos.row < src.start_row; pos.row++) { for(pos.col = 0; pos.col < screen->cols; pos.col++) - vterm_screen_get_cell(screen, pos, screen->sb_buffer + pos.col); + (void)vterm_screen_get_cell(screen, pos, screen->sb_buffer + pos.col); (screen->callbacks->sb_pushline)(screen->cols, screen->sb_buffer, screen->cbdata); } diff --git a/src/libvterm/src/state.c b/src/libvterm/src/state.c index 88c259c34e..5a6feacb1b 100644 --- a/src/libvterm/src/state.c +++ b/src/libvterm/src/state.c @@ -878,6 +878,7 @@ static void request_dec_mode(VTermState *state, int num) case 2004: reply = state->mode.bracketpaste; + break; default: vterm_push_output_sprintf_ctrl(state->vt, C1_CSI, "?%d;%d$y", num, 0); diff --git a/src/version.c b/src/version.c index 741536e2ff..5fe8eed5bc 100644 --- a/src/version.c +++ b/src/version.c @@ -769,6 +769,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1062, /**/ 1061, /**/ From 28550b74bb4373417eb6fbf132bd4211b7b92afa Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 5 Sep 2017 23:31:01 +0200 Subject: [PATCH 11/12] patch 8.0.1063: Coverity warns for NULL check and array use Problem: Coverity warns for NULL check and using variable pointer as an array. Solution: Remove the NULL check. Make "argvar" an array. --- src/terminal.c | 16 +++++++++------- src/version.c | 2 ++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/terminal.c b/src/terminal.c index b3f5f0af1c..3ceb360fbc 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -462,7 +462,7 @@ term_start(typval_T *argvar, jobopt_T *opt, int forceit) void ex_terminal(exarg_T *eap) { - typval_T argvar; + typval_T argvar[2]; jobopt_T opt; char_u *cmd; char_u *tofree = NULL; @@ -525,8 +525,8 @@ ex_terminal(exarg_T *eap) } cmd = skipwhite(p); } - if (cmd == NULL || *cmd == NUL) - /* Make a copy, an autocommand may set 'shell'. */ + if (*cmd == NUL) + /* Make a copy of 'shell', an autocommand may change the option. */ tofree = cmd = vim_strsave(p_sh); if (eap->addr_count > 0) @@ -539,9 +539,10 @@ ex_terminal(exarg_T *eap) opt.jo_in_bot = eap->line2; } - argvar.v_type = VAR_STRING; - argvar.vval.v_string = cmd; - term_start(&argvar, &opt, eap->forceit); + argvar[0].v_type = VAR_STRING; + argvar[0].vval.v_string = cmd; + argvar[1].v_type = VAR_UNKNOWN; + term_start(argvar, &opt, eap->forceit); vim_free(tofree); } @@ -2886,7 +2887,8 @@ f_term_wait(typval_T *argvars, typval_T *rettv UNUSED) && STRCMP(job_status(buf->b_term->tl_job), "dead") == 0) { /* The job is dead, keep reading channel I/O until the channel is - * closed. */ + * closed. buf->b_term may become NULL if the terminal was closed while + * waiting. */ ch_log(NULL, "term_wait(): waiting for channel to close"); while (buf->b_term != NULL && !buf->b_term->tl_channel_closed) { diff --git a/src/version.c b/src/version.c index 5fe8eed5bc..6be7b82553 100644 --- a/src/version.c +++ b/src/version.c @@ -769,6 +769,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1063, /**/ 1062, /**/ From 1b9f9d315f137cc883c7aecd39f3df329b7f9085 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 5 Sep 2017 23:32:38 +0200 Subject: [PATCH 12/12] patch 8.0.1064: Coverity warns for leaking resource Problem: Coverity warns for leaking resource. Solution: Free pty_master_fd on failure. --- src/os_unix.c | 3 +++ src/version.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/os_unix.c b/src/os_unix.c index 57ea4d9451..1ec59fcdcf 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -5692,7 +5692,10 @@ mch_create_pty_channel(job_T *job, jobopt_T *options) channel = add_channel(); if (channel == NULL) + { + close(pty_master_fd); return FAIL; + } job->jv_channel = channel; /* ch_refcount was set by add_channel() */ channel->ch_keep_open = TRUE; diff --git a/src/version.c b/src/version.c index 6be7b82553..6a0fa7b611 100644 --- a/src/version.c +++ b/src/version.c @@ -769,6 +769,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1064, /**/ 1063, /**/