Skip to content

Commit f8d76ac

Browse files
committed
Update builtin.{txt,jax}
1 parent 31e4c74 commit f8d76ac

2 files changed

Lines changed: 89 additions & 2 deletions

File tree

doc/builtin.jax

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim バージョン 9.1. Last change: 2025 Dec 11
1+
*builtin.txt* For Vim バージョン 9.1. Last change: 2025 Dec 13
22

33

44
VIM リファレンスマニュアル by Bram Moolenaar
@@ -546,6 +546,9 @@ readdirex({dir} [, {expr} [, {dict}]])
546546
イル情報を取得
547547
readfile({fname} [, {type} [, {max}]])
548548
リスト ファイル{fname}から行のリストを取得
549+
redraw_listener_add({opts}) 数値 再描画を監視するためのコールバックを追
550+
加する
551+
redraw_listener_remove({id}) なし 再描画リスナーを削除する
549552
reduce({object}, {func} [, {initial}])
550553
任意 {func} を使って {object} の 畳み込み
551554
(reduce) を行う
@@ -8633,6 +8636,46 @@ readfile({fname} [, {type} [, {max}]]) *readfile()*
86338636
戻り値の型: list<string> または list<any>
86348637

86358638

8639+
redraw_listener_add({opts}) *redraw_listener_add()*
8640+
再描画サイクルの特定のタイミングで呼び出されるコールバック関数
8641+
を保持するリスナーを追加する。{opts} は定義するコールバック関
8642+
数を含む辞書である。少なくとも 1 つのコールバックを指定する必
8643+
要がある。 *E1571*
8644+
|redraw_listener_remove()| に渡すことができる一意の ID を返す。
8645+
8646+
{opts} には次のエントリが含まれる:
8647+
8648+
on_start 画面の再描画ごとに最初に呼び出される。引数は取
8649+
らず、何も返さない。
8650+
on_end 各画面の再描画の最後に呼び出される。引数は取ら
8651+
ず、何も返さない。
8652+
8653+
この関数の良い使用例は、unbuffered を TRUE に設定した
8654+
|listener_add()| コールバックである。これにより、バッファの変
8655+
更時に状態を変更し、変更があった場合にのみ、次の再描画の直前に
8656+
その状態をレンダリングできる。バッファの変更ごとにレンダリング
8657+
または再描画を試行するのはとても非効率的である。
8658+
8659+
{opts} で定義されたコールバックの実行中に redraw_listener_add()
8660+
を呼び出すことはできない。 *E1570*
8661+
8662+
|method| としても使用できる: >
8663+
GetOpts()->redraw_listener_add()
8664+
<
8665+
戻り値の型: |Number|
8666+
8667+
8668+
redraw_listener_remove({id}) *redraw_listener_remove()*
8669+
|redraw_listener_add()| で以前に追加された再描画リスナーを削除
8670+
する。{id} が見つからなかった場合は FALSE を返し、{id} が削除
8671+
された場合は TRUE を返す。
8672+
8673+
|method| としても使用できる: >
8674+
GetRedrawListenerId()->redraw_listener_remove()
8675+
<
8676+
戻り値の型: |Number|
8677+
8678+
86368679
reduce({object}, {func} [, {initial}]) *reduce()* *E998*
86378680
|String|、|List|、|Tuple| もしくは |Blob| である {object} の各
86388681
要素ごとに {func} を呼ぶ。{func} は2つの引数で呼ばれる: こ

en/builtin.txt

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim version 9.1. Last change: 2025 Dec 11
1+
*builtin.txt* For Vim version 9.1. Last change: 2025 Dec 13
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -493,6 +493,8 @@ readdirex({dir} [, {expr} [, {dict}]])
493493
List file info in {dir} selected by {expr}
494494
readfile({fname} [, {type} [, {max}]])
495495
List get list of lines from file {fname}
496+
redraw_listener_add({opts}) Number add callbacks to listen for redraws
497+
redraw_listener_remove({id}) none remove a redraw listener
496498
reduce({object}, {func} [, {initial}])
497499
any reduce {object} using {func}
498500
reg_executing() String get the executing register name
@@ -8785,6 +8787,48 @@ readfile({fname} [, {type} [, {max}]]) *readfile()*
87858787
Return type: list<string> or list<any>
87868788

87878789

8790+
redraw_listener_add({opts}) *redraw_listener_add()*
8791+
Add a listener that holds callback functions that will be
8792+
called at specific times in the redraw cycle. {opts} is a
8793+
dictionary that contain the callback functions to be defined.
8794+
At least one callback must be specified. *E1571*
8795+
Returns a unique ID that can be passed to
8796+
|redraw_listener_remove()|.
8797+
8798+
{opts} may have the following entries:
8799+
8800+
on_start Called first on each screen redraw. Takes no
8801+
arguments and returns nothing.
8802+
on_end Called at the end of each screen redraw.
8803+
Takes no arguments and returns nothing.
8804+
8805+
A good use case for this function is with the |listener_add()|
8806+
callback with unbuffered set to TRUE. This allows you to
8807+
modify the state on buffer changes, and finally render that
8808+
state just before the next redraw, only if it has changed.
8809+
Attempting to render or redraw for every single buffer change
8810+
would be very inefficient.
8811+
8812+
You may not call redraw_listener_add() during any of the
8813+
callbacks defined in {opts}. *E1570*
8814+
8815+
Can also be used as a |method|: >
8816+
GetOpts()->redraw_listener_add()
8817+
<
8818+
Return type: |Number|
8819+
8820+
8821+
redraw_listener_remove({id}) *redraw_listener_remove()*
8822+
Remove a redraw listener previously added with
8823+
|redraw_listener_add()|. Returns FALSE when {id} could not be
8824+
found, TRUE when {id} was removed.
8825+
8826+
Can also be used as a |method|: >
8827+
GetRedrawListenerId()->redraw_listener_remove()
8828+
<
8829+
Return type: |Number|
8830+
8831+
87888832
reduce({object}, {func} [, {initial}]) *reduce()* *E998*
87898833
{func} is called for every item in {object}, which can be a
87908834
|String|, |List|, |Tuple| or a |Blob|. {func} is called with

0 commit comments

Comments
 (0)