Mercurial > vim
comparison src/option.c @ 16447:54ffc82f38a8 v8.1.1228
patch 8.1.1228: not possible to process tags with a function
commit https://github.com/vim/vim/commit/45e18cbdc40afd8144d20dcc07ad2d981636f4c9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Apr 28 18:05:35 2019 +0200
patch 8.1.1228: not possible to process tags with a function
Problem: Not possible to process tags with a function.
Solution: Add tagfunc() (Christian Brabandt, Andy Massimino, closes https://github.com/vim/vim/issues/4010)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 28 Apr 2019 18:15:07 +0200 |
parents | a1229400434a |
children | 7ae2396cef62 |
comparison
equal
deleted
inserted
replaced
16446:cee0719a1b4b | 16447:54ffc82f38a8 |
---|---|
165 #ifdef FEAT_SEARCHPATH | 165 #ifdef FEAT_SEARCHPATH |
166 # define PV_SUA OPT_BUF(BV_SUA) | 166 # define PV_SUA OPT_BUF(BV_SUA) |
167 #endif | 167 #endif |
168 #define PV_SW OPT_BUF(BV_SW) | 168 #define PV_SW OPT_BUF(BV_SW) |
169 #define PV_SWF OPT_BUF(BV_SWF) | 169 #define PV_SWF OPT_BUF(BV_SWF) |
170 #ifdef FEAT_EVAL | |
171 # define PV_TFU OPT_BUF(BV_TFU) | |
172 #endif | |
170 #define PV_TAGS OPT_BOTH(OPT_BUF(BV_TAGS)) | 173 #define PV_TAGS OPT_BOTH(OPT_BUF(BV_TAGS)) |
171 #define PV_TC OPT_BOTH(OPT_BUF(BV_TC)) | 174 #define PV_TC OPT_BOTH(OPT_BUF(BV_TC)) |
172 #define PV_TS OPT_BUF(BV_TS) | 175 #define PV_TS OPT_BUF(BV_TS) |
173 #define PV_TW OPT_BUF(BV_TW) | 176 #define PV_TW OPT_BUF(BV_TW) |
174 #define PV_TX OPT_BUF(BV_TX) | 177 #define PV_TX OPT_BUF(BV_TX) |
300 static char_u *p_cpt; | 303 static char_u *p_cpt; |
301 #endif | 304 #endif |
302 #ifdef FEAT_COMPL_FUNC | 305 #ifdef FEAT_COMPL_FUNC |
303 static char_u *p_cfu; | 306 static char_u *p_cfu; |
304 static char_u *p_ofu; | 307 static char_u *p_ofu; |
308 #endif | |
309 #ifdef FEAT_EVAL | |
310 static char_u *p_tfu; | |
305 #endif | 311 #endif |
306 static int p_eol; | 312 static int p_eol; |
307 static int p_fixeol; | 313 static int p_fixeol; |
308 static int p_et; | 314 static int p_et; |
309 static char_u *p_fenc; | 315 static char_u *p_fenc; |
2640 #endif | 2646 #endif |
2641 SCTX_INIT}, | 2647 SCTX_INIT}, |
2642 {"tagcase", "tc", P_STRING|P_VIM, | 2648 {"tagcase", "tc", P_STRING|P_VIM, |
2643 (char_u *)&p_tc, PV_TC, | 2649 (char_u *)&p_tc, PV_TC, |
2644 {(char_u *)"followic", (char_u *)"followic"} SCTX_INIT}, | 2650 {(char_u *)"followic", (char_u *)"followic"} SCTX_INIT}, |
2651 {"tagfunc", "tfu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE, | |
2652 #ifdef FEAT_EVAL | |
2653 (char_u *)&p_tfu, PV_TFU, | |
2654 {(char_u *)"", (char_u *)0L} | |
2655 #else | |
2656 (char_u *)NULL, PV_NONE, | |
2657 {(char_u *)0L, (char_u *)0L} | |
2658 #endif | |
2659 SCTX_INIT}, | |
2645 {"taglength", "tl", P_NUM|P_VI_DEF, | 2660 {"taglength", "tl", P_NUM|P_VI_DEF, |
2646 (char_u *)&p_tl, PV_NONE, | 2661 (char_u *)&p_tl, PV_NONE, |
2647 {(char_u *)0L, (char_u *)0L} SCTX_INIT}, | 2662 {(char_u *)0L, (char_u *)0L} SCTX_INIT}, |
2648 {"tagrelative", "tr", P_BOOL|P_VIM, | 2663 {"tagrelative", "tr", P_BOOL|P_VIM, |
2649 (char_u *)&p_tr, PV_NONE, | 2664 (char_u *)&p_tr, PV_NONE, |
5687 #endif | 5702 #endif |
5688 #ifdef FEAT_COMPL_FUNC | 5703 #ifdef FEAT_COMPL_FUNC |
5689 check_string_option(&buf->b_p_cfu); | 5704 check_string_option(&buf->b_p_cfu); |
5690 check_string_option(&buf->b_p_ofu); | 5705 check_string_option(&buf->b_p_ofu); |
5691 #endif | 5706 #endif |
5707 #ifdef FEAT_EVAL | |
5708 check_string_option(&buf->b_p_tfu); | |
5709 #endif | |
5692 #ifdef FEAT_KEYMAP | 5710 #ifdef FEAT_KEYMAP |
5693 check_string_option(&buf->b_p_keymap); | 5711 check_string_option(&buf->b_p_keymap); |
5694 #endif | 5712 #endif |
5695 #ifdef FEAT_QUICKFIX | 5713 #ifdef FEAT_QUICKFIX |
5696 check_string_option(&buf->b_p_gp); | 5714 check_string_option(&buf->b_p_gp); |
10941 case PV_CPT: return (char_u *)&(curbuf->b_p_cpt); | 10959 case PV_CPT: return (char_u *)&(curbuf->b_p_cpt); |
10942 #endif | 10960 #endif |
10943 #ifdef FEAT_COMPL_FUNC | 10961 #ifdef FEAT_COMPL_FUNC |
10944 case PV_CFU: return (char_u *)&(curbuf->b_p_cfu); | 10962 case PV_CFU: return (char_u *)&(curbuf->b_p_cfu); |
10945 case PV_OFU: return (char_u *)&(curbuf->b_p_ofu); | 10963 case PV_OFU: return (char_u *)&(curbuf->b_p_ofu); |
10964 #endif | |
10965 #ifdef FEAT_EVAL | |
10966 case PV_TFU: return (char_u *)&(curbuf->b_p_tfu); | |
10946 #endif | 10967 #endif |
10947 case PV_EOL: return (char_u *)&(curbuf->b_p_eol); | 10968 case PV_EOL: return (char_u *)&(curbuf->b_p_eol); |
10948 case PV_FIXEOL: return (char_u *)&(curbuf->b_p_fixeol); | 10969 case PV_FIXEOL: return (char_u *)&(curbuf->b_p_fixeol); |
10949 case PV_ET: return (char_u *)&(curbuf->b_p_et); | 10970 case PV_ET: return (char_u *)&(curbuf->b_p_et); |
10950 case PV_FENC: return (char_u *)&(curbuf->b_p_fenc); | 10971 case PV_FENC: return (char_u *)&(curbuf->b_p_fenc); |
11329 buf->b_p_cpt = vim_strsave(p_cpt); | 11350 buf->b_p_cpt = vim_strsave(p_cpt); |
11330 #endif | 11351 #endif |
11331 #ifdef FEAT_COMPL_FUNC | 11352 #ifdef FEAT_COMPL_FUNC |
11332 buf->b_p_cfu = vim_strsave(p_cfu); | 11353 buf->b_p_cfu = vim_strsave(p_cfu); |
11333 buf->b_p_ofu = vim_strsave(p_ofu); | 11354 buf->b_p_ofu = vim_strsave(p_ofu); |
11355 #endif | |
11356 #ifdef FEAT_EVAL | |
11357 buf->b_p_tfu = vim_strsave(p_tfu); | |
11334 #endif | 11358 #endif |
11335 buf->b_p_sts = p_sts; | 11359 buf->b_p_sts = p_sts; |
11336 buf->b_p_sts_nopaste = p_sts_nopaste; | 11360 buf->b_p_sts_nopaste = p_sts_nopaste; |
11337 #ifdef FEAT_VARTABS | 11361 #ifdef FEAT_VARTABS |
11338 buf->b_p_vsts = vim_strsave(p_vsts); | 11362 buf->b_p_vsts = vim_strsave(p_vsts); |