Skip to content

Commit 15ac416

Browse files
authored
Merge pull request #1172 from tsuyoshicho/update/20221016/tagsrch
Update tagsrch.{txt,jax}
2 parents bef0cea + b71263c commit 15ac416

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

doc/tagsrch.jax

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -877,13 +877,15 @@ CTRL-W d 新しいウィンドウを開き、カーソルの下にあったキ
877877

878878
タグリストの生成に使用される関数は、'tagfunc' オプションを設定することによって
879879
指定される。関数は3つの引数で呼び出される:
880-
a:pattern タグ検索中に使用されたタグ識別子もしくはパターン。
881-
a:flags 関数の挙動を制御するためのフラグを含む文字列。
882-
a:info 以下のエントリを含む辞書:
880+
pattern タグ検索中に使用されたタグ識別子もしくはパターン。
881+
flags 関数の挙動を制御するためのフラグを含む文字列。
882+
info 以下のエントリを含む辞書:
883883
buf_ffname F優先順位のために使用できる完全ファイル名。
884884
user_data カスタムデータ文字列。以前の tagfunc によっ
885885
てタグスタックに格納されている場合。
886886

887+
Note 旧来の関数では使用時に引数名の前に "a:" を追加する必要がある。
888+
887889
現在、タグ関数には最大3つのフラグを渡すことができる:
888890
'c' この関数は、処理中の通常のコマンドによって呼び出された。
889891
(ニーモニック: タグ関数は、カーソルの周りのコンテキストを使用
@@ -919,6 +921,7 @@ Note フォーマットは |taglist()| のものと似ており、これによ
919921
れる。
920922

921923
タグスタックを 'tagfunc' の内部から変更することはできない。 *E986*
924+
'tagfunc' の内部からウィンドウを閉じたり変更したりすることはできない。 *E1299*
922925

923926
以下は、'tagfunc' に使用される関数の仮定の例である。結果(ファイル名の逆順のタ
924927
グのリスト)を生成するために |taglist()| の出力を使用している。

en/tagsrch.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -889,13 +889,16 @@ like |CTRL-]|.
889889

890890
The function used for generating the taglist is specified by setting the
891891
'tagfunc' option. The function will be called with three arguments:
892-
a:pattern The tag identifier or pattern used during the tag search.
893-
a:flags String containing flags to control the function behavior.
894-
a:info Dict containing the following entries:
892+
pattern The tag identifier or pattern used during the tag search.
893+
flags String containing flags to control the function behavior.
894+
info Dict containing the following entries:
895895
buf_ffname Full filename which can be used for priority.
896896
user_data Custom data String, if stored in the tag
897897
stack previously by tagfunc.
898898

899+
Note that in a legacy function "a:" needs to be prepended to the argument name
900+
when using it.
901+
899902
Currently up to three flags may be passed to the tag function:
900903
'c' The function was invoked by a normal command being processed
901904
(mnemonic: the tag function may use the context around the
@@ -931,6 +934,8 @@ If the function returns |v:null| instead of a List, a standard tag lookup will
931934
be performed instead.
932935

933936
It is not allowed to change the tagstack from inside 'tagfunc'. *E986*
937+
It is not allowed to close a window or change window from inside 'tagfunc'.
938+
*E1299*
934939

935940
The following is a hypothetical example of a function used for 'tagfunc'. It
936941
uses the output of |taglist()| to generate the result: a list of tags in the

0 commit comments

Comments
 (0)