Skip to content

Commit 09500cc

Browse files
authored
Merge pull request #911 from tsuyoshicho/update/testtagsrch-20210502
Update {testing,tagsrch}.{txt,jax}
2 parents 94dbf7d + ce0b623 commit 09500cc

File tree

4 files changed

+43
-12
lines changed

4 files changed

+43
-12
lines changed

doc/tagsrch.jax

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

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

887-
現在、タグ関数には2つのフラグを渡すことができる:
887+
現在、タグ関数には最大3つのフラグを渡すことができる:
888888
'c' この関数は、処理中の通常のコマンドによって呼び出された。
889889
(ニーモニック: タグ関数は、カーソルの周りのコンテキストを使用
890890
して、タグリストを生成するためのより良い作業を実行できる。)
891891
'i' 挿入モードで、ユーザーはタグを補完していた(|i_CTRL-X_CTRL-]|
892-
で)
892+
もしくは 'completeopt'`t` を含む場合)
893+
'r' tagfunc の最初の引数は、|pattern| (|tag-regexp| を参照) として
894+
解釈され、使用時には: >
895+
:tag /pat
896+
< また挿入モードの補完時にも提供される。
897+
このフラグが存在しない場合、引数は常に文字通りの完全なタグ名と
898+
して扱われる。
893899

894900
Note 'tagfunc' が設定されている場合、|tag-priority| に記述されているタグの優先
895901
順位は適用されない。代わりに、優先順位は、関数によって返されるリスト内の要素の

doc/testing.jax

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*testing.txt* For Vim バージョン 8.2. Last change: 2020 Dec 12
1+
*testing.txt* For Vim バージョン 8.2. Last change: 2021 Apr 02
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -169,6 +169,7 @@ test_override({name}, {val}) *test_override()*
169169
セージの最大3秒の待ち時間を上書きする。
170170
term_props バージョン文字列が検出された場合、すべてのター
171171
ミナルプロパティをリセットする。
172+
uptime sysinfo.uptime を上書きする
172173
ALL すべての置き換えをクリアする ({val} は使われない)
173174

174175
"starting" は、起動が完了したようにテストが振る舞うべきときに
@@ -242,7 +243,7 @@ test_srand_seed([seed]) *test_srand_seed()*
242243
assert_beeps({cmd}) *assert_beeps()*
243244
{cmd} を実行し、それがビープもしくはビジュアルベルを発生させな
244245
かった場合、|v:errors| にエラーメッセージを追加する。
245-
|assert_fails()| および |assert-return| も参照。
246+
|assert_fails()||assert_nobeep()||assert-return| も参照。
246247

247248
|method| としても使用できる: >
248249
GetCmd()->assert_beeps()
@@ -371,6 +372,14 @@ assert_match({pattern}, {actual} [, {msg}])
371372

372373
|method| としても使用できる: >
373374
getFile()->assert_match('foo.*')
375+
<
376+
assert_nobeep({cmd}) *assert_nobeep()*
377+
{cmd} を実行し、それがビープもしくはビジュアルベルを発生させた
378+
場合、|v:errors| にエラーメッセージを追加する。
379+
|assert_beeps()| も参照。
380+
381+
|method| としても使用できる: >
382+
GetCmd()->assert_nobeep()
374383
<
375384
*assert_notequal()*
376385
assert_notequal({expected}, {actual} [, {msg}])

en/tagsrch.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -888,19 +888,25 @@ like |CTRL-]|.
888888

889889
The 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

905911
Note 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

en/testing.txt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*testing.txt* For Vim version 8.2. Last change: 2020 Dec 12
1+
*testing.txt* For Vim version 8.2. Last change: 2021 Apr 02
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -168,6 +168,7 @@ test_override({name}, {val}) *test_override()*
168168
wait time of up to 3 seconds for messages
169169
term_props reset all terminal properties when the version
170170
string is detected
171+
uptime overrules sysinfo.uptime
171172
ALL clear all overrides ({val} is not used)
172173

173174
"starting" is to be used when a test should behave like
@@ -242,7 +243,8 @@ test_srand_seed([seed]) *test_srand_seed()*
242243
assert_beeps({cmd}) *assert_beeps()*
243244
Run {cmd} and add an error message to |v:errors| if it does
244245
NOT produce a beep or visual bell.
245-
Also see |assert_fails()| and |assert-return|.
246+
Also see |assert_fails()|, |assert_nobeep()| and
247+
|assert-return|.
246248

247249
Can also be used as a |method|: >
248250
GetCmd()->assert_beeps()
@@ -375,6 +377,14 @@ assert_match({pattern}, {actual} [, {msg}])
375377

376378
Can also be used as a |method|: >
377379
getFile()->assert_match('foo.*')
380+
<
381+
assert_nobeep({cmd}) *assert_nobeep()*
382+
Run {cmd} and add an error message to |v:errors| if it
383+
produces a beep or visual bell.
384+
Also see |assert_beeps()|.
385+
386+
Can also be used as a |method|: >
387+
GetCmd()->assert_nobeep()
378388
<
379389
*assert_notequal()*
380390
assert_notequal({expected}, {actual} [, {msg}])

0 commit comments

Comments
 (0)