diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/api.txt | 8 | ||||
-rw-r--r-- | runtime/doc/news.txt | 1 | ||||
-rw-r--r-- | runtime/lua/vim/_meta/api.lua | 10 |
3 files changed, 12 insertions, 7 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 572e5e4267..5a6361d45f 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -3150,11 +3150,13 @@ nvim_open_win({buffer}, {enter}, {config}) *nvim_open_win()* • {config} Map defining the window configuration. Keys: • relative: Sets the window layout to "floating", placed at (row,col) coordinates relative to: - • "editor" The global editor grid + • "cursor" Cursor position in current window. + • "editor" The global editor grid. + • "laststatus" 'laststatus' if present, or last row. + • "mouse" Mouse position. + • "tabline" Tabline if present, or first row. • "win" Window given by the `win` field, or current window. - • "cursor" Cursor position in current window. - • "mouse" Mouse position • win: |window-ID| window to split, or relative window when creating a float (relative="win"). • anchor: Decides which corner of the float to place at diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 89504ae244..e6a1adf15b 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -187,6 +187,7 @@ API • |nvim__ns_set()| can set properties for a namespace • |nvim_echo()| `err` field to print error messages and `chunks` accepts highlight group IDs. +• |nvim_open_win()| `relative` field can be set to "laststatus" and "tabline". DEFAULTS diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua index 8930f131f6..670e867c1e 100644 --- a/runtime/lua/vim/_meta/api.lua +++ b/runtime/lua/vim/_meta/api.lua @@ -1754,10 +1754,12 @@ function vim.api.nvim_open_term(buffer, opts) end --- @param config vim.api.keyset.win_config Map defining the window configuration. Keys: --- - relative: Sets the window layout to "floating", placed at (row,col) --- coordinates relative to: ---- - "editor" The global editor grid ---- - "win" Window given by the `win` field, or current window. ---- - "cursor" Cursor position in current window. ---- - "mouse" Mouse position +--- - "cursor" Cursor position in current window. +--- - "editor" The global editor grid. +--- - "laststatus" 'laststatus' if present, or last row. +--- - "mouse" Mouse position. +--- - "tabline" Tabline if present, or first row. +--- - "win" Window given by the `win` field, or current window. --- - win: `window-ID` window to split, or relative window when creating a --- float (relative="win"). --- - anchor: Decides which corner of the float to place at (row,col): |