mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.1255: cannot use a lambda with quickfix functions
Problem: Cannot use a lambda with quickfix functions. Solution: Add support for lambda. (Yegappan Lakshmanan, closes #6499)
This commit is contained in:
@@ -3848,6 +3848,27 @@ set_callback(callback_T *dest, callback_T *src)
|
||||
dest->cb_partial = src->cb_partial;
|
||||
}
|
||||
|
||||
/*
|
||||
* Copy callback from "src" to "dest", incrementing the refcounts.
|
||||
*/
|
||||
void
|
||||
copy_callback(callback_T *dest, callback_T *src)
|
||||
{
|
||||
dest->cb_partial = src->cb_partial;
|
||||
if (dest->cb_partial != NULL)
|
||||
{
|
||||
dest->cb_name = src->cb_name;
|
||||
dest->cb_free_name = FALSE;
|
||||
++dest->cb_partial->pt_refcount;
|
||||
}
|
||||
else
|
||||
{
|
||||
dest->cb_name = vim_strsave(src->cb_name);
|
||||
dest->cb_free_name = TRUE;
|
||||
func_ref(src->cb_name);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Unref/free "callback" returned by get_callback() or set_callback().
|
||||
*/
|
||||
|
Reference in New Issue
Block a user