Skip to content

Update popup.{txt, jax} #743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions doc/popup.jax
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
*popup.txt* For Vim バージョン 8.1. Last change: 2019 Nov 03
*popup.txt* For Vim バージョン 8.2. Last change: 2019 Nov 30


VIMリファレンスマニュアル by Bram Moolenaar


フローティングウィンドウにテキストを表示する。 *popup* *popup-window*
フローティングウィンドウにテキストを表示する。*popup* *popup-window* *popupwin*


1. 前書き |popup-intro|
Expand All @@ -24,7 +24,7 @@
3. 例 |popup-examples|


{|+textprop| 機能無効でコンパイルされたときは使用できない}
{|+popupwin| 機能無効でコンパイルされたときは使用できない}

==============================================================================
1. 前書き *popup-intro*
Expand Down Expand Up @@ -187,6 +187,8 @@ popup_atcursor({what}, {options}) *popup_atcursor()*
\ moved: 'WORD',
\ })
< プロパティを変更するには {options} を使用する。
"pos" が "topleft" として渡された場合、"line" のデフォルトは
"cursor+1" になる。

|method| としても使用できる: >
GetText()->popup_atcursor({})
Expand Down Expand Up @@ -365,7 +367,8 @@ popup_getpos({id}) *popup_getpos()*
core_height 画面セル内のテキストボックスの高さ
firstline 上端のバッファの行(スクロールされていない限り1)
("firstline" のプロパティの値ではない)
lastline 下端のバッファの行
lastline 下端のバッファの行(ポップアップの再描画時に更
新される)
scrollbar スクロールバーが表示されていれば非0
visible ポップアップが表示されている場合は 1、非表示の
場合は 0
Expand Down Expand Up @@ -570,6 +573,10 @@ popup_create() に渡す。
用される。あるいは "center" を使ってポップアップをVim
のウィンドウの中央に配置することもできる。その場合は
"line" と "col" は無視される。
posinvert FALSE の場合、"pos" の値が常に使用される。TRUE (デフォ
ルト)で、ポップアップが垂直に収まらず、反対側により多
くのスペースがある場合、ポップアップは "line" で示され
る位置の反対側に配置される。
textprop 指定した場合、ポップアップはこの名前のテキストプロパ
ティの隣に配置され、テキストプロパティが移動すると移動
する。削除するには空の文字列を使用すること。
Expand Down Expand Up @@ -680,6 +687,8 @@ popup_create() に渡す。
- [{lnum}, {start}, {end}]: カーソルが行 {lnum} から離
れた場合、または、桁が {start} の前、または {end} の
後に移動した場合
- [0, 0, 0]: カーソルが移動するときにポップアップを閉
じない
カーソルが別の行または別のウィンドウに移動した場合も
ポップアップは閉じる。
mousemoved "moved" に似ているが、マウスポインタの位置を参照する。
Expand Down Expand Up @@ -842,9 +851,7 @@ zindex を持つポップアップウィンドウのフィルタが最初に呼
cursor keys 別のエントリを選択
Tab 現在の提案を受け入れる

マウスクリックは <LeftMouse> として届く。座標は v:mouse_popup_col および
v:mouse_popup_row である。ポップアップの左上の画面セルは、桁 1、行 1である(ボー
ダーはカウントしない)。
マウスクリックは <LeftMouse> として届く。座標は |getmousepos()| で取得できる。

Vimは標準のフィルタ |popup_filter_menu()| と |popup_filter_yesno()| を提供す
る。
Expand Down
23 changes: 16 additions & 7 deletions en/popup.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
*popup.txt* For Vim version 8.1. Last change: 2019 Nov 03
*popup.txt* For Vim version 8.2. Last change: 2019 Nov 30


VIM REFERENCE MANUAL by Bram Moolenaar


Displaying text in a floating window. *popup* *popup-window*
Displaying text in a floating window. *popup* *popup-window* *popupwin*


1. Introduction |popup-intro|
Expand All @@ -24,7 +24,7 @@ Displaying text in a floating window. *popup* *popup-window*
4. Examples |popup-examples|


{not available if the |+textprop| feature was disabled at compile time}
{not available if the |+popupwin| feature was disabled at compile time}

==============================================================================
1. Introduction *popup-intro*
Expand Down Expand Up @@ -186,6 +186,8 @@ popup_atcursor({what}, {options}) *popup_atcursor()*
\ moved: 'WORD',
\ })
< Use {options} to change the properties.
If "pos" is passed as "topleft" then the default for "line"
becomes "cursor+1".

Can also be used as a |method|: >
GetText()->popup_atcursor({})
Expand Down Expand Up @@ -362,7 +364,8 @@ popup_getpos({id}) *popup_getpos()*
core_height height of the text box in screen cells
firstline line of the buffer at top (1 unless scrolled)
(not the value of the "firstline" property)
lastline line of the buffer at the bottom
lastline line of the buffer at the bottom (updated when
the popup is redrawn)
scrollbar non-zero if a scrollbar is displayed
visible one if the popup is displayed, zero if hidden
Note that these are the actual screen positions. They differ
Expand Down Expand Up @@ -566,6 +569,11 @@ The second argument of |popup_create()| is a dictionary with options:
Alternatively "center" can be used to position the
popup in the center of the Vim window, in which case
"line" and "col" are ignored.
posinvert When FALSE the value of "pos" is always used. When
TRUE (the default) and the popup does not fit
vertically and there is more space on the other side
then the popup is placed on the other side of the
position indicated by "line".
textprop When present the popup is positioned next to a text
property with this name and will move when the text
property moves. Use an empty string to remove. See
Expand Down Expand Up @@ -686,6 +694,8 @@ The second argument of |popup_create()| is a dictionary with options:
- [{lnum}, {start}, {end}]: if the cursor moved away
from line {lnum}, before column {start} or after
{end}
- [0, 0, 0] do not close the popup when the cursor
moves
The popup also closes if the cursor moves to another
line or to another window.
mousemoved Like "moved" but referring to the mouse pointer
Expand Down Expand Up @@ -852,9 +862,8 @@ Some recommended key actions:
cursor keys select another entry
Tab accept current suggestion

A mouse click arrives as <LeftMouse>. The coordinates are in
v:mouse_popup_col and v:mouse_popup_row. The top-left screen cell of the
popup is col 1, row 1 (not counting the border).
A mouse click arrives as <LeftMouse>. The coordinates can be obtained with
|getmousepos()|.

Vim provides standard filters |popup_filter_menu()| and
|popup_filter_yesno()|.
Expand Down