Mercurial > vim
diff src/eval.c @ 8210:b717dae2f26d v7.4.1398
commit https://github.com/vim/vim/commit/4e221c99e85ed40c98892068a01270b9e7492d98
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Feb 23 13:20:22 2016 +0100
patch 7.4.1398
Problem: The close-cb option is not implemented yet.
Solution: Implemente close-cb. (Yasuhiro Matsumoto)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 23 Feb 2016 13:30:07 +0100 |
parents | c16aa03d8db5 |
children | 05b88224cea1 |
line wrap: on
line diff
--- a/src/eval.c +++ b/src/eval.c @@ -10067,6 +10067,18 @@ get_job_options(typval_T *tv, jobopt_T * return FAIL; } } + else if (STRCMP(hi->hi_key, "close-cb") == 0) + { + if (!(supported & JO_CLOSE_CALLBACK)) + break; + opt->jo_set |= JO_CLOSE_CALLBACK; + opt->jo_close_cb = get_callback(item); + if (opt->jo_close_cb == NULL) + { + EMSG2(_(e_invarg2), "close-cb"); + return FAIL; + } + } else if (STRCMP(hi->hi_key, "waittime") == 0) { if (!(supported & JO_WAITTIME)) @@ -18924,7 +18936,7 @@ item_compare2(const void *s1, const void rettv.v_type = VAR_UNKNOWN; /* clear_tv() uses this */ res = call_func(sortinfo->item_compare_func, - (int)STRLEN(sortinfo->item_compare_func), + (int)STRLEN(sortinfo->item_compare_func), &rettv, 2, argv, 0L, 0L, &dummy, TRUE, sortinfo->item_compare_selfdict); clear_tv(&argv[0]);