aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Mishchenko <mishchea@gmail.com>2022-05-11 19:49:19 -0400
committerGitHub <noreply@github.com>2022-05-11 16:49:19 -0700
commit7900a8b7131f18c3991db64b06a0291c818f6784 (patch)
tree6c768be75d3f05bcedcfa49bb06fdf239618f3fd
parentcf68f0a51202342163825015602bdf78b783c777 (diff)
downloadrneovim-7900a8b7131f18c3991db64b06a0291c818f6784.tar.gz
rneovim-7900a8b7131f18c3991db64b06a0291c818f6784.tar.bz2
rneovim-7900a8b7131f18c3991db64b06a0291c818f6784.zip
docs(api): how to check if window is floating #18503
-rw-r--r--runtime/doc/api.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index 4570d5e63d..257515d737 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -426,6 +426,14 @@ Two ways to create a floating window:
To close it use |nvim_win_close()| or a command such as |:close|.
+To check whether a window is floating, check whether the `relative` option in
+its config is non-empty: >
+
+ if vim.api.nvim_win_get_config(window_id).relative ~= '' then
+ -- window with this window_id is floating
+ end
+>
+
Buffer text can be highlighted by typical mechanisms (syntax highlighting,
|api-highlights|). The |hl-NormalFloat| group highlights normal text;
'winhighlight' can be used as usual to override groups locally. Floats inherit