aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/vim.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-04-13 14:25:15 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2019-04-14 10:12:09 +0200
commitc8acbe3b623a4d7636e88b30f779c03845cf548f (patch)
tree7e8698c31b6e4988a10eb4fb4160ee9339b4c206 /src/nvim/api/vim.c
parentd08692a8246039b938b5645a6c01b4ff7f51671e (diff)
downloadrneovim-c8acbe3b623a4d7636e88b30f779c03845cf548f.tar.gz
rneovim-c8acbe3b623a4d7636e88b30f779c03845cf548f.tar.bz2
rneovim-c8acbe3b623a4d7636e88b30f779c03845cf548f.zip
windows: float config changes
- Allow floating windows of width 1. #9846 - For a new floating window the size must be specified. Later on we might try to calculate a reasonable size by buffer contents - Remember the configured size of a window, just like its position. - Make get_config and set_config more consistent. Handle relative='' properly in set_config. get_config doesn't return keys that don't make sense for a non-floating window. - Don't use width=0 for non-changed width, just omit the key.
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r--src/nvim/api/vim.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index f56d37af90..d0327b241c 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -1003,7 +1003,8 @@ Buffer nvim_create_buf(Boolean listed, Boolean scratch, Error *err)
///
/// For a general overview of floats, see |api-floatwin|.
///
-/// Exactly one of `external` and `relative` must be specified.
+/// Exactly one of `external` and `relative` must be specified. The `width` and
+/// `height` of the new window must be specified.
///
/// 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.
@@ -1035,7 +1036,7 @@ Buffer nvim_create_buf(Boolean listed, Boolean scratch, Error *err)
/// - "SW" south-west
/// - "SE" south-east
/// - `height`: window height (in character cells). Minimum of 1.
-/// - `width`: window width (in character cells). Minimum of 2.
+/// - `width`: window width (in character cells). Minimum of 1.
/// - `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