Patch 7.4.1687
Problem: The channel close_cb option does not work.
Solution: Use jo_close_partial instead of jo_err_partial. (Damien)
Files: src/channel.c, src/testdir/test_channel.vim
*** ../vim-7.4.1686/src/channel.c 2016-03-28 22:37:36.923328156 +0200
--- src/channel.c 2016-03-30 21:00:21.331777705 +0200
***************
*** 1103,1109 ****
*cbp = vim_strsave(opt->jo_close_cb);
else
*cbp = NULL;
! *pp = opt->jo_err_partial;
if (*pp != NULL)
++(*pp)->pt_refcount;
}
--- 1103,1109 ----
*cbp = vim_strsave(opt->jo_close_cb);
else
*cbp = NULL;
! *pp = opt->jo_close_partial;
if (*pp != NULL)
++(*pp)->pt_refcount;
}
*** ../vim-7.4.1686/src/testdir/test_channel.vim 2016-03-28
19:16:15.669846492 +0200
--- src/testdir/test_channel.vim 2016-03-30 20:57:35.673469335 +0200
***************
*** 1203,1208 ****
--- 1203,1231 ----
call s:run_server('s:test_close_callback')
endfunc
+ function s:test_close_partial(port)
+ let handle = ch_open('localhost:' . a:port, s:chopt)
+ if ch_status(handle) == "fail"
+ call assert_false(1, "Can't open channel")
+ return
+ endif
+ let s:d = {}
+ func s:d.closeCb(ch) dict
+ let self.close_ret = 'closed'
+ endfunc
+ call ch_setoptions(handle, {'close_cb': s:d.closeCb})
+
+ call assert_equal('', ch_evalexpr(handle, 'close me'))
+ call s:waitFor('"closed" == s:d.close_ret')
+ call assert_equal('closed', s:d.close_ret)
+ unlet s:d
+ endfunc
+
+ func Test_close_partial()
+ call ch_log('Test_close_partial()')
+ call s:run_server('s:test_close_partial')
+ endfunc
+
func Test_job_start_invalid()
call assert_fails('call job_start($x)', 'E474:')
call assert_fails('call job_start("")', 'E474:')
*** ../vim-7.4.1686/src/version.c 2016-03-30 20:50:41.905696041 +0200
--- src/version.c 2016-03-30 21:01:22.515153009 +0200
***************
*** 750,751 ****
--- 750,753 ----
{ /* Add new patch number below this line */
+ /**/
+ 1687,
/**/
--
An error has occurred. Hit any user to continue.
/// Bram Moolenaar -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.