Mercurial > vim
comparison runtime/doc/popup.txt @ 16855:19162ff4eacd v8.1.1429
patch 8.1.1429: "pos" option of popup window not supported yet
commit https://github.com/vim/vim/commit/ac1f1bc222b7de3cb2d3f1f2aa076f11c75e69de
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu May 30 21:24:26 2019 +0200
patch 8.1.1429: "pos" option of popup window not supported yet
Problem: "pos" option of popup window not supported yet.
Solution: Implement the option. Rename popup_getposition() to
popup_getpos().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 30 May 2019 21:30:04 +0200 |
parents | e6bcccccbf7b |
children | 0154363d3b98 |
comparison
equal
deleted
inserted
replaced
16854:a84036f2d3ec | 16855:19162ff4eacd |
---|---|
230 Override options in popup {id} with entries in {options}. | 230 Override options in popup {id} with entries in {options}. |
231 | 231 |
232 | 232 |
233 popup_getoptions({id}) *popup_getoptions()* | 233 popup_getoptions({id}) *popup_getoptions()* |
234 Return the {options} for popup {id} in a Dict. | 234 Return the {options} for popup {id} in a Dict. |
235 A zero value means the option was not set. | 235 A zero value means the option was not set. For "zindex" the |
236 default value is returned, not zero. | |
236 | 237 |
237 The "highlight" entry is omitted, use the 'wincolor' option | 238 The "highlight" entry is omitted, use the 'wincolor' option |
238 for that: > | 239 for that: > |
239 let hl = getwinvar(winid, '&wincolor') | 240 let hl = getwinvar(winid, '&wincolor') |
240 | 241 |
241 < If popup window {id} is not found an empty Dict is returned. | 242 < If popup window {id} is not found an empty Dict is returned. |
242 | 243 |
243 popup_getposition({id}) *popup_getposition()* | 244 popup_getpos({id}) *popup_getpos()* |
244 Return the position and size of popup {id}. Returns a Dict | 245 Return the position and size of popup {id}. Returns a Dict |
245 with these entries: | 246 with these entries: |
246 col screen column of the popup, one-based | 247 col screen column of the popup, one-based |
247 line screen line of the popup, one-based | 248 line screen line of the popup, one-based |
248 width width of the popup in screen cells | 249 width width of the popup in screen cells |
301 |prop_add()|, but specifying the column in the | 302 |prop_add()|, but specifying the column in the |
302 dictionary with a "col" entry, see below: | 303 dictionary with a "col" entry, see below: |
303 |popup-props|. | 304 |popup-props|. |
304 | 305 |
305 The second argument of |popup_create()| is a dictionary with options: | 306 The second argument of |popup_create()| is a dictionary with options: |
306 line screen line where to position the popup; can use | 307 line screen line where to position the popup; can use a |
307 "cursor", "cursor+1" or "cursor-1" to use the line of | 308 number or "cursor", "cursor+1" or "cursor-1" to use |
308 the cursor and add or subtract a number of lines; | 309 the line of the cursor and add or subtract a number of |
309 default is "cursor-1". | 310 lines; if omitted the popup is vertically centered, |
310 col screen column where to position the popup; can use | 311 otherwise "pos" is used. |
311 "cursor" to use the column of the cursor, "cursor+99" | 312 col screen column where to position the popup; can use a |
312 and "cursor-99" to add or subtract a number of | 313 number or "cursor" to use the column of the cursor, |
313 columns; default is "cursor" | 314 "cursor+99" and "cursor-99" to add or subtract a |
315 number of columns; if omitted the popup is | |
316 horizontally centered, otherwise "pos" is used | |
314 pos "topleft", "topright", "botleft" or "botright": | 317 pos "topleft", "topright", "botleft" or "botright": |
315 defines what corner of the popup "line" and "col" are | 318 defines what corner of the popup "line" and "col" are |
316 used for. When not set "topleft" is used. | 319 used for. When not set "topleft" is used. |
317 Alternatively "center" can be used to position the | 320 Alternatively "center" can be used to position the |
318 popup in the center of the Vim window. | 321 popup in the center of the Vim window, in which case |
322 "line" and "col" are ignored. | |
319 {not implemented yet} | 323 {not implemented yet} |
320 flip when TRUE (the default) and the position is relative | 324 flip when TRUE (the default) and the position is relative |
321 to the cursor, flip to below or above the cursor to | 325 to the cursor, flip to below or above the cursor to |
322 avoid overlap with the |popupmenu-completion| or | 326 avoid overlap with the |popupmenu-completion| or |
323 another popup with a higher "zindex" | 327 another popup with a higher "zindex" |