aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-07-07 21:35:55 +0200
committerGitHub <noreply@github.com>2019-07-07 21:35:55 +0200
commit524fe6205d01d8ced45bc4b00ed397add01a41bf (patch)
tree8fd4cb84d1149da6f636b5bd5bbb114df86b982b /runtime
parent28a86608a84672b3b64981c3b47b80b051cb5177 (diff)
parentef3e32d57ee0ebe3f425998216d8bf61ffdc28bb (diff)
downloadrneovim-524fe6205d01d8ced45bc4b00ed397add01a41bf.tar.gz
rneovim-524fe6205d01d8ced45bc4b00ed397add01a41bf.tar.bz2
rneovim-524fe6205d01d8ced45bc4b00ed397add01a41bf.zip
Merge pull request #10090 from bfredl/floatpopup
api/window: add style="minimal" flag to disable unwanted UI features for simple floats
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/api.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index 065a052175..709e5885e4 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -284,14 +284,18 @@ highlighting, or |api-highlights|.
By default, floats will use |hl-NormalFloat| as normal highlight, which
links to |hl-Pmenu| in the builtin color scheme. The 'winhighlight' option can
be used to override it. Currently, floating windows don't support any visual
-decorations like a border or additional widgets like scrollbar.
+decorations like a border or additional widgets like scrollbar. By default,
+floats will inherit options from the current window. This is not always
+useful for some options, like 'number'. Use `style='minimal'` flag to
+|nvim_open_win()| to disable many UI features that are unwanted for a simple
+float, like end-of-buffer region or special columns.
Here is an example for creating a float with scratch buffer: >
let buf = nvim_create_buf(v:false, v:true)
call nvim_buf_set_lines(buf, 0, -1, v:true, ["test", "text"])
let opts = {'relative': 'cursor', 'width': 10, 'height': 2, 'col': 0,
- \ 'row': 1, 'anchor': 'NW'}
+ \ 'row': 1, 'anchor': 'NW', 'style': 'minimal'}
let win = nvim_open_win(buf, 0, opts)
" optional: change highlight, otherwise Pmenu is used
call nvim_win_set_option(win, 'winhl', 'Normal:MyHighlight')