@@ -888,19 +888,25 @@ like |CTRL-]|.
888888
889889The function used for generating the taglist is specified by setting the
890890'tagfunc' option. The function will be called with three arguments:
891- a:pattern The tag identifier used during the tag search.
892- a:flags List of flags to control the function behavior.
891+ a:pattern The tag identifier or pattern used during the tag search.
892+ a:flags String containing flags to control the function behavior.
893893 a:info Dict containing the following entries:
894894 buf_ffname Full filename which can be used for priority.
895895 user_data Custom data String, if stored in the tag
896896 stack previously by tagfunc.
897897
898- Currently two flags may be passed to the tag function:
898+ Currently up to three flags may be passed to the tag function:
899899 'c' The function was invoked by a normal command being processed
900900 (mnemonic: the tag function may use the context around the
901901 cursor to perform a better job of generating the tag list.)
902902 'i' In Insert mode, the user was completing a tag (with
903- | i_CTRL-X_CTRL-] | ).
903+ | i_CTRL-X_CTRL-] | or 'completeopt' contains `t ` ).
904+ 'r' The first argument to tagfunc should be interpreted as a
905+ | pattern | (see | tag-regexp | ), such as when using: >
906+ :tag /pat
907+ < It is also given when completing in insert mode.
908+ If this flag is not present, the argument is usually taken
909+ literally as the full tag name.
904910
905911Note that when 'tagfunc' is set, the priority of the tags described in
906912| tag-priority | does not apply. Instead, the priority is exactly as the
0 commit comments