aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_meta
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-10-20 22:18:26 +0800
committerGitHub <noreply@github.com>2024-10-20 22:18:26 +0800
commit9b8907d90508d7b66f025bbd1f5a48a78c5ce035 (patch)
tree28ba9bba6705cf19f8f3279c6b0b3ade41c81f4c /runtime/lua/vim/_meta
parentdff684fdb3d2e787ac6d6fd49ec52ede604fd0ce (diff)
downloadrneovim-9b8907d90508d7b66f025bbd1f5a48a78c5ce035.tar.gz
rneovim-9b8907d90508d7b66f025bbd1f5a48a78c5ce035.tar.bz2
rneovim-9b8907d90508d7b66f025bbd1f5a48a78c5ce035.zip
feat(float): allow enabling mouse for non-focusable window (#30844)
Problem: Cannot allow mouse interaction for non-focusable float window. Solution: Add a "mouse" field to float window config.
Diffstat (limited to 'runtime/lua/vim/_meta')
-rw-r--r--runtime/lua/vim/_meta/api.lua7
-rw-r--r--runtime/lua/vim/_meta/api_keysets.lua1
2 files changed, 7 insertions, 1 deletions
diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua
index c66b295d3a..8236cc7cf0 100644
--- a/runtime/lua/vim/_meta/api.lua
+++ b/runtime/lua/vim/_meta/api.lua
@@ -1767,7 +1767,12 @@ function vim.api.nvim_open_term(buffer, opts) end
--- fractional.
--- - focusable: Enable focus by user actions (wincmds, mouse events).
--- Defaults to true. Non-focusable windows can be entered by
---- `nvim_set_current_win()`.
+--- `nvim_set_current_win()`, or, when the `mouse` field is set to true,
+--- by mouse events.
+--- - mouse: Specify how this window interacts with mouse events.
+--- Defaults to `focusable` value.
+--- - If false, mouse events pass through this window.
+--- - If true, mouse events interact with this window normally.
--- - external: GUI should display the window as an external
--- top-level window. Currently accepts no other positioning
--- configuration together with this.
diff --git a/runtime/lua/vim/_meta/api_keysets.lua b/runtime/lua/vim/_meta/api_keysets.lua
index 2fe5c32faf..bf184dee2d 100644
--- a/runtime/lua/vim/_meta/api_keysets.lua
+++ b/runtime/lua/vim/_meta/api_keysets.lua
@@ -295,6 +295,7 @@ error('Cannot require a meta file')
--- @field bufpos? any[]
--- @field external? boolean
--- @field focusable? boolean
+--- @field mouse? boolean
--- @field vertical? boolean
--- @field zindex? integer
--- @field border? any