diff options
author | Marco Hinz <mh.codebro@gmail.com> | 2019-03-15 18:03:12 +0100 |
---|---|---|
committer | Marco Hinz <mh.codebro@gmail.com> | 2019-03-16 12:35:58 +0100 |
commit | 96edbe7b1d6144f3cf9b720d61182ee31858b478 (patch) | |
tree | a5f6cb34a5731f9e96aa2fadee819c1ce3f27295 /src/nvim/api/vim.c | |
parent | 3c88bbecb8dc2bf1fb426cce08af232640bfd44d (diff) | |
download | rneovim-96edbe7b1d6144f3cf9b720d61182ee31858b478.tar.gz rneovim-96edbe7b1d6144f3cf9b720d61182ee31858b478.tar.bz2 rneovim-96edbe7b1d6144f3cf9b720d61182ee31858b478.zip |
api: add width/height to FloatConfig
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r-- | src/nvim/api/vim.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index a773234ea0..37bad4d517 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -1004,8 +1004,6 @@ Buffer nvim_create_buf(Boolean listed, Boolean scratch, Error *err) /// /// @param buffer handle of buffer to be displayed in the window /// @param enter whether the window should be entered (made the current window) -/// @param width width of window (in character cells) -/// @param height height of window (in character cells) /// @param options dict of options for configuring window positioning /// accepts the following keys: /// `relative`: If set, the window becomes a floating window. The window @@ -1023,6 +1021,8 @@ Buffer nvim_create_buf(Boolean listed, Boolean scratch, Error *err) /// `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. +/// `height`: window height (in character cells). Cannot be smaller than 1. +/// `width`: window width (in character cells). Cannot be smaller than 2. /// `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 @@ -1047,16 +1047,15 @@ Buffer nvim_create_buf(Boolean listed, Boolean scratch, Error *err) /// /// @param[out] err Error details, if any /// @return the window handle or 0 when error -Window nvim_open_win(Buffer buffer, Boolean enter, - Integer width, Integer height, - Dictionary options, Error *err) +Window nvim_open_win(Buffer buffer, Boolean enter, Dictionary options, + Error *err) FUNC_API_SINCE(6) { FloatConfig config = FLOAT_CONFIG_INIT; if (!parse_float_config(options, &config, false, err)) { return 0; } - win_T *wp = win_new_float(NULL, (int)width, (int)height, config, err); + win_T *wp = win_new_float(NULL, config, err); if (!wp) { return 0; } |