comparison src/tag.c @ 24186:4902263c302e v8.2.2634

patch 8.2.2634: 'tagfunc' does not indicate using a pattern Commit: https://github.com/vim/vim/commit/f90c855c71863296859780f7b4e0386e96f1c465 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 21 14:49:57 2021 +0100 patch 8.2.2634: 'tagfunc' does not indicate using a pattern Problem: 'tagfunc' does not indicate using a pattern. Solution: Add the "r" flag. (Andy Massimino, closes https://github.com/vim/vim/issues/7982)
author Bram Moolenaar <Bram@vim.org>
date Sun, 21 Mar 2021 15:00:03 +0100
parents bcf16185be60
children 5c456a88f651
comparison
equal deleted inserted replaced
24185:177f016c6405 24186:4902263c302e
1306 listitem_T *item; 1306 listitem_T *item;
1307 int ntags = 0; 1307 int ntags = 0;
1308 int result = FAIL; 1308 int result = FAIL;
1309 typval_T args[4]; 1309 typval_T args[4];
1310 typval_T rettv; 1310 typval_T rettv;
1311 char_u flagString[3]; 1311 char_u flagString[4];
1312 dict_T *d; 1312 dict_T *d;
1313 taggy_T *tag = &curwin->w_tagstack[curwin->w_tagstackidx]; 1313 taggy_T *tag = &curwin->w_tagstack[curwin->w_tagstackidx];
1314 1314
1315 if (*curbuf->b_p_tfu == NUL) 1315 if (*curbuf->b_p_tfu == NUL)
1316 return FAIL; 1316 return FAIL;
1333 args[2].vval.v_dict = d; 1333 args[2].vval.v_dict = d;
1334 1334
1335 args[3].v_type = VAR_UNKNOWN; 1335 args[3].v_type = VAR_UNKNOWN;
1336 1336
1337 vim_snprintf((char *)flagString, sizeof(flagString), 1337 vim_snprintf((char *)flagString, sizeof(flagString),
1338 "%s%s", 1338 "%s%s%s",
1339 g_tag_at_cursor ? "c": "", 1339 g_tag_at_cursor ? "c": "",
1340 flags & TAG_INS_COMP ? "i": ""); 1340 flags & TAG_INS_COMP ? "i": "",
1341 flags & TAG_REGEXP ? "r": "");
1341 1342
1342 save_pos = curwin->w_cursor; 1343 save_pos = curwin->w_cursor;
1343 result = call_vim_function(curbuf->b_p_tfu, 3, args, &rettv); 1344 result = call_vim_function(curbuf->b_p_tfu, 3, args, &rettv);
1344 curwin->w_cursor = save_pos; // restore the cursor position 1345 curwin->w_cursor = save_pos; // restore the cursor position
1345 --d->dv_refcount; 1346 --d->dv_refcount;