Mercurial > vim
comparison src/structs.h @ 30281:d3cfd12839ef v9.0.0476
patch 9.0.0476: varargs does not work for replacement function of substitute()
Commit: https://github.com/vim/vim/commit/48db5dafecacced4a9e42de3f92838b2d59beb4c
Author: zeertzjq <zeertzjq@outlook.com>
Date: Fri Sep 16 12:10:03 2022 +0100
patch 9.0.0476: varargs does not work for replacement function of substitute()
Problem: Varargs does not work for replacement function of substitute().
Solution: Check the varargs flag of the function. (closes https://github.com/vim/vim/issues/11142)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 16 Sep 2022 13:15:05 +0200 |
parents | c0f0118b6790 |
children | 61a688be1899 |
comparison
equal
deleted
inserted
replaced
30280:29cd2b722dfc | 30281:d3cfd12839ef |
---|---|
2050 } evalarg_T; | 2050 } evalarg_T; |
2051 #endif | 2051 #endif |
2052 | 2052 |
2053 // Struct passed between functions dealing with function call execution. | 2053 // Struct passed between functions dealing with function call execution. |
2054 // | 2054 // |
2055 // "argv_func", when not NULL, can be used to fill in arguments only when the | 2055 // "fe_argv_func", when not NULL, can be used to fill in arguments only when the |
2056 // invoked function uses them. It is called like this: | 2056 // invoked function uses them. It is called like this: |
2057 // new_argcount = argv_func(current_argcount, argv, partial_argcount, | 2057 // new_argcount = fe_argv_func(current_argcount, argv, partial_argcount, |
2058 // called_func_argcount) | 2058 // called_func) |
2059 // | 2059 // |
2060 typedef struct { | 2060 typedef struct { |
2061 int (* fe_argv_func)(int, typval_T *, int, int); | 2061 int (* fe_argv_func)(int, typval_T *, int, ufunc_T *); |
2062 linenr_T fe_firstline; // first line of range | 2062 linenr_T fe_firstline; // first line of range |
2063 linenr_T fe_lastline; // last line of range | 2063 linenr_T fe_lastline; // last line of range |
2064 int *fe_doesrange; // if not NULL: return: function handled range | 2064 int *fe_doesrange; // if not NULL: return: function handled range |
2065 int fe_evaluate; // actually evaluate expressions | 2065 int fe_evaluate; // actually evaluate expressions |
2066 partial_T *fe_partial; // for extra arguments | 2066 partial_T *fe_partial; // for extra arguments |