vim-patch:7.4.1559

Problem:    Passing cookie to a callback is clumsy.
Solution:   Change function() to take arguments and return a partial.

1735bc988c
This commit is contained in:
Michael Ennen
2016-10-24 23:53:07 -07:00
committed by James McCoy
parent 75c18b6aaa
commit 521e45f2a8
12 changed files with 450 additions and 97 deletions

View File

@@ -69,6 +69,11 @@
///
/// @param fun Function name.
/// @def TYPVAL_ENCODE_CONV_PARTIAL
/// @brief Macros used to convert a partial
///
/// @param partial Partial name.
/// @def TYPVAL_ENCODE_CONV_EMPTY_LIST
/// @brief Macros used to convert an empty list
///
@@ -248,6 +253,10 @@ static int name##_convert_one_value(firstargtype firstargname, \
TYPVAL_ENCODE_CONV_FUNC(tv->vval.v_string); \
break; \
} \
case VAR_PARTIAL: { \
TYPVAL_ENCODE_CONV_PARTIAL(tv->vval.v_partial); \
break; \
} \
case VAR_LIST: { \
if (tv->vval.v_list == NULL || tv->vval.v_list->lv_len == 0) { \
TYPVAL_ENCODE_CONV_EMPTY_LIST(); \