diff options
| author | Björn Linse <bjorn.linse@gmail.com> | 2019-03-12 17:37:43 +0100 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-12 17:37:43 +0100 | 
| commit | 8760816d4672b6badbc264033f8c6922570b7a9a (patch) | |
| tree | 93cb7091317e5205b4a7bcdb650ad6e65e4697de /src/nvim/api/vim.c | |
| parent | 9312e2d06ae29db2e21b575b007c29da514e5df3 (diff) | |
| parent | dec3e027d902a59369550b9da8f6c10da61f06ef (diff) | |
| download | rneovim-8760816d4672b6badbc264033f8c6922570b7a9a.tar.gz rneovim-8760816d4672b6badbc264033f8c6922570b7a9a.tar.bz2 rneovim-8760816d4672b6badbc264033f8c6922570b7a9a.zip  | |
Merge pull request #9722 from bfredl/float-doc2
Float docs and defaults.
Diffstat (limited to 'src/nvim/api/vim.c')
| -rw-r--r-- | src/nvim/api/vim.c | 12 | 
1 files changed, 7 insertions, 5 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index cb5ed5ecda..a773234ea0 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -15,6 +15,7 @@  #include "nvim/api/private/defs.h"  #include "nvim/api/private/dispatch.h"  #include "nvim/api/buffer.h" +#include "nvim/api/window.h"  #include "nvim/msgpack_rpc/channel.h"  #include "nvim/msgpack_rpc/helpers.h"  #include "nvim/lua/executor.h" @@ -997,6 +998,8 @@ Buffer nvim_create_buf(Boolean listed, Boolean scratch, Error *err)  /// 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.  ///  /// @param buffer handle of buffer to be displayed in the window @@ -1049,7 +1052,6 @@ Window nvim_open_win(Buffer buffer, Boolean enter,                       Dictionary options, Error *err)    FUNC_API_SINCE(6)  { -  win_T *old = curwin;    FloatConfig config = FLOAT_CONFIG_INIT;    if (!parse_float_config(options, &config, false, err)) {      return 0; @@ -1058,11 +1060,11 @@ Window nvim_open_win(Buffer buffer, Boolean enter,    if (!wp) {      return 0;    } -  if (buffer > 0) { -    nvim_set_current_buf(buffer, err); +  if (enter) { +    win_enter(wp, false);    } -  if (!enter) { -    win_enter(old, false); +  if (buffer > 0) { +    nvim_win_set_buf(wp->handle, buffer, err);    }    return wp->handle;  }  | 
