diff options
Diffstat (limited to 'data/vim/patches/8.1.0618')
-rw-r--r-- | data/vim/patches/8.1.0618 | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/data/vim/patches/8.1.0618 b/data/vim/patches/8.1.0618 new file mode 100644 index 000000000..c3da9a41b --- /dev/null +++ b/data/vim/patches/8.1.0618 @@ -0,0 +1,76 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0618 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0618 +Problem: term_getjob() does not return v:null as documented. +Solution: Do return v:null. (Damien) Add a test. +Files: src/terminal.c, src/testdir/test_terminal.vim + + +*** ../vim-8.1.0617/src/terminal.c 2018-12-21 16:04:16.316437487 +0100 +--- src/terminal.c 2018-12-21 20:45:39.984928633 +0100 +*************** +*** 4794,4804 **** + { + buf_T *buf = term_get_buf(argvars, "term_getjob()"); + +- rettv->v_type = VAR_JOB; +- rettv->vval.v_job = NULL; + if (buf == NULL) + return; + + rettv->vval.v_job = buf->b_term->tl_job; + if (rettv->vval.v_job != NULL) + ++rettv->vval.v_job->jv_refcount; +--- 4794,4807 ---- + { + buf_T *buf = term_get_buf(argvars, "term_getjob()"); + + if (buf == NULL) ++ { ++ rettv->v_type = VAR_SPECIAL; ++ rettv->vval.v_number = VVAL_NULL; + return; ++ } + ++ rettv->v_type = VAR_JOB; + rettv->vval.v_job = buf->b_term->tl_job; + if (rettv->vval.v_job != NULL) + ++rettv->vval.v_job->jv_refcount; +*** ../vim-8.1.0617/src/testdir/test_terminal.vim 2018-12-16 16:16:05.384854629 +0100 +--- src/testdir/test_terminal.vim 2018-12-21 20:44:48.205306549 +0100 +*************** +*** 1714,1716 **** +--- 1714,1721 ---- + call Stop_shell_in_terminal(bufnr) + exe bufnr . 'bwipe' + endfunc ++ ++ func Test_terminal_no_job() ++ let term = term_start('false', {'term_finish': 'close'}) ++ call WaitForAssert({-> assert_equal(v:null, term_getjob(term)) }) ++ endfunc +*** ../vim-8.1.0617/src/version.c 2018-12-21 17:59:30.100109769 +0100 +--- src/version.c 2018-12-21 20:55:03.092853384 +0100 +*************** +*** 801,802 **** +--- 801,804 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 618, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +37. You start looking for hot HTML addresses in public restrooms. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |