Skip to content

Commit 50e3320

Browse files
authored
Merge pull request #1633 from vim-jp/hh-update-popup
Update popup.{txt,jax}
2 parents a447811 + d0d6932 commit 50e3320

File tree

2 files changed

+32
-7
lines changed

2 files changed

+32
-7
lines changed

doc/popup.jax

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*popup.txt* For Vim バージョン 9.1. Last change: 2024 Jun 08
1+
*popup.txt* For Vim バージョン 9.1. Last change: 2024 Jun 16
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -187,6 +187,7 @@ Exコマンドの出力のために画面がスクロールアップすると、
187187
|popup_move()| ポップアップの位置とサイズを変更する
188188
|popup_setoptions()| ポップアップのオプションを上書きする
189189
|popup_settext()| ポップアップバッファの内容を置き換える
190+
|popup_setbuf()| ポップアップウィンドウのバッファを設定する
190191

191192
ポップアップウィンドウを閉じる:
192193
|popup_close()| 1つのポップアップを閉じる
@@ -581,6 +582,18 @@ popup_notification({what}, {options}) *popup_notification()*
581582
戻り値の型: |Number|
582583

583584

585+
popup_setbuf({id}, {buf}) *popup_setbuf()*
586+
ポップアップウィンドウ {id} に表示されるバッファ {buf} を設定
587+
する。{buf} の使用については、|bufname()| 関数を参照。
588+
バッファテキストのサイズに合わせてウィンドウのサイズや位置が変
589+
更されるかもしれない。
590+
591+
|method| としても使用できる: >
592+
GetPopup()->popup_setbuf(bufnr('foobar'))
593+
<
594+
戻り値の型: |vim9-boolean|
595+
596+
584597
popup_setoptions({id}, {options}) *popup_setoptions()*
585598
ポップアップ {id} のオプションを {options} のエントリで上書き
586599
する。
@@ -622,8 +635,8 @@ popup_setoptions({id}, {options}) *popup_setoptions()*
622635

623636
popup_settext({id}, {text}) *popup_settext()*
624637
ポップアップウィンドウ {id} でバッファのテキストを設定する。
625-
{text} |popup_create()| に提供されるものと同じである。ただ
626-
し、バッファ番号は許可されない
638+
{text}、ポップアップに表示される文字列または文字列のリスト
639+
である
627640
テキストの違いが生じる以外の、ウィンドウのサイズや位置は変わら
628641
ない。
629642

en/popup.txt

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*popup.txt* For Vim version 9.1. Last change: 2024 Jun 08
1+
*popup.txt* For Vim version 9.1. Last change: 2024 Jun 16
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -186,6 +186,7 @@ Manipulating a popup window:
186186
|popup_move()| change the position and size of a popup
187187
|popup_setoptions()| override options of a popup
188188
|popup_settext()| replace the popup buffer contents
189+
|popup_setbuf()| set the buffer for the popup window
189190

190191
Closing popup windows:
191192
|popup_close()| close one popup
@@ -574,6 +575,18 @@ popup_notification({what}, {options}) *popup_notification()*
574575
Return type: |Number|
575576

576577

578+
popup_setbuf({id}, {buf}) *popup_setbuf()*
579+
Set buffer {buf} to be displayed in popup win {id}. For the
580+
use of {buf}, see |bufname()| function.
581+
May change window size or position to adjust for the size
582+
of the buffer text.
583+
584+
Can also be used as a |method|: >
585+
GetPopup()->popup_setbuf(bufnr('foobar'))
586+
<
587+
Return type: |vim9-boolean|
588+
589+
577590
popup_setoptions({id}, {options}) *popup_setoptions()*
578591
Override options in popup {id} with entries in {options}.
579592
These options can be set:
@@ -613,9 +626,8 @@ popup_setoptions({id}, {options}) *popup_setoptions()*
613626

614627

615628
popup_settext({id}, {text}) *popup_settext()*
616-
Set the text of the buffer in popup win {id}. {text} is the
617-
same as supplied to |popup_create()|, except that a buffer
618-
number is not allowed.
629+
Set the text of the buffer in popup win {id}. {text} is
630+
a string or a list of strings to be displayed in the popup.
619631
Does not change the window size or position, other than caused
620632
by the different text.
621633

0 commit comments

Comments
 (0)