diff options
| -rw-r--r-- | runtime/doc/api.txt | 107 | 
1 files changed, 107 insertions, 0 deletions
| diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index f0e3f2c3a1..fe0b8402d3 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -613,6 +613,82 @@ nvim_set_current_win({window})                        *nvim_set_current_win()*                  Parameters: ~                      {window}  Window handle +nvim_create_buf({listed}, {scratch})                       *nvim_create_buf()* +                Creates a new, empty, unnamed buffer. + +                Parameters: ~ +                    {listed}   Controls 'buflisted' +                    {scratch}  Creates a "throwaway" |scratch-buffer| for +                               temporary work (always 'nomodified') + +                Return: ~ +                    Buffer handle, or 0 on error + +                                                             *nvim_open_win()* +nvim_open_win({buffer}, {enter}, {width}, {height}, {options}) +                Open a new window. + +                Currently this is used to open floating and external windows. +                Floats are windows that are drawn above the split layout, at +                some anchor position in some other window. Floats can be draw +                internally or by external GUI with the |ui-multigrid| +                extension. External windows are only supported with multigrid +                GUIs, and are displayed as separate top-level windows. + +                For a general overview of floats, see |api-floatwin|. + +                Exactly one of `external` and `relative` must be specified. + +                Parameters: ~ +                    {buffer}   handle of buffer to be displayed in the window +                    {enter}    whether the window should be entered (made the +                               current window) +                    {width}    width of window (in character cells) +                    {height}   height of window (in character cells) +                    {options}  dict of options for configuring window +                               positioning accepts the following keys: +                               `relative`: If set, the window becomes a +                               floating window. The window will be placed with +                               row,col coordinates relative one of the +                               following: "editor" the global editor grid +                               "win" a window. Use 'win' option below to +                               specify window id, or current window will be +                               used by default. "cursor" the cursor position +                               in current window. `anchor`: the corner of the +                               float that the row,col position defines "NW" +                               north-west (default) "NE" north-east "SW" +                               south-west "SE" south-east `focusable`: Whether +                               window can be focused by wincmds and mouse +                               events. Defaults to true. Even if set to false, +                               the window can still be entered using +                               |nvim_set_current_win()| API call. `row`: row +                               position. Screen cell height are used as unit. +                               Can be floating point. `col`: column position. +                               Screen cell width is used as unit. Can be +                               floating point. `win`: when using +                               relative='win', window id of the window where +                               the position is defined. `external` GUI should +                               display the window as an external top-level +                               window. Currently accepts no other positioning +                               options together with this. +                With editor positioning row=0, col=0 refers to the top-left +                corner of the screen-grid and row=Lines-1, Columns-1 refers to +                the bottom-right corner. Floating point values are allowed, +                but the builtin implementation (used by TUI and GUIs without +                multigrid support) will always round down to nearest integer. + +                Out-of-bounds values, and configurations that make the float +                not fit inside the main editor, are allowed. The builtin +                implementation will truncate values so floats are completely +                within the main screen grid. External GUIs could let floats +                hover outside of the main window like a tooltip, but this +                should not be used to specify arbitrary WM screen positions. + +                Parameters: ~ + +                Return: ~ +                    the window handle or 0 when error +  nvim_list_tabpages()                                    *nvim_list_tabpages()*                  Gets the current list of tabpage handles. @@ -1473,6 +1549,37 @@ nvim_win_is_valid({window})                              *nvim_win_is_valid()*                  Return: ~                      true if the window is valid, false otherwise +                                                           *nvim_win_config()* +nvim_win_config({window}, {width}, {height}, {options}) +                Configure window position. Currently this is only used to +                configure floating and external windows (including changing a +                split window to these types). + +                See documentation at |nvim_open_win()|, for the meaning of +                parameters. Pass in -1 for 'witdh' and 'height' to keep +                exiting size. + +                When reconfiguring a floating window, absent option keys will +                not be changed. The following restriction apply: `row`, `col` +                and `relative` must be reconfigured together. Only changing a +                subset of these is an error. + +nvim_win_close({window}, {force})                           *nvim_win_close()* +                Close a window. + +                This is equivalent to |:close| with count except that it takes +                a window id. + +                Parameters: ~ +                    {window}  Window handle +                    {force}   Behave like `:close!` The last window of a +                              buffer with unwritten changes can be closed. The +                              buffer will become hidden, even if 'hidden' is +                              not set. + +                Return: ~ +                    Window number +  ==============================================================================  Tabpage Functions                                                *api-tabpage* | 
