Skip to content

Commit d3220ff

Browse files
committed
Update options.{txt,jax}
1 parent ea9d0b1 commit d3220ff

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

doc/options.jax

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim バージョン 9.1. Last change: 2024 Oct 22
1+
*options.txt* For Vim バージョン 9.1. Last change: 2024 Oct 28
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -3587,6 +3587,10 @@ Note 1番目の形式では、行全体がオプション指定に使われる
35873587
式は、|:find| コマンドの呼び出しごとに 1 回だけ評価される。
35883588
式は、'path' で指定されたすべてのディレクトリを処理できる。
35893589

3590+
式はコマンドライン補完のためにも評価される可能性があり、その場合、
3591+
|v:cmdcomplete| 変数は |v:true| に設定され、それ以外の場合は |v:false|
3592+
に設定される。
3593+
35903594
マッチした場合、式は 1 つ以上のファイル名を含む |List| を返す必要があ
35913595
る。マッチしない場合、式は空のリストを返す必要がある。
35923596

@@ -3604,7 +3608,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる
36043608
>
36053609
" glob() を使う
36063610
func FindExprGlob()
3607-
return glob(v:fname, v:false, v:true)
3611+
let pat = v:cmdcomplete ? $'{v:fname}*' : v:fname
3612+
return glob(pat, v:false, v:true)
36083613
endfunc
36093614
set findexpr=FindExprGlob()
36103615

en/options.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim version 9.1. Last change: 2024 Oct 22
1+
*options.txt* For Vim version 9.1. Last change: 2024 Oct 28
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3567,6 +3567,10 @@ A jump table for the options with a short description can be found at |Q_op|.
35673567
The expression is evaluated only once per |:find| command invocation.
35683568
The expression can process all the directories specified in 'path'.
35693569

3570+
The expression may be evaluated for command-line completion as well,
3571+
in which case the |v:cmdcomplete| variable will be set to |v:true|,
3572+
otherwise it will be set to |v:false|.
3573+
35703574
If a match is found, the expression should return a |List| containing
35713575
one or more file names. If a match is not found, the expression
35723576
should return an empty List.
@@ -3586,7 +3590,8 @@ A jump table for the options with a short description can be found at |Q_op|.
35863590
>
35873591
" Use glob()
35883592
func FindExprGlob()
3589-
return glob(v:fname, v:false, v:true)
3593+
let pat = v:cmdcomplete ? $'{v:fname}*' : v:fname
3594+
return glob(pat, v:false, v:true)
35903595
endfunc
35913596
set findexpr=FindExprGlob()
35923597

0 commit comments

Comments
 (0)