diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-07-25 23:17:02 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-07-25 23:17:02 +0530 |
| commit | 031b22e0bb0f1d132731aea3776917731a8ab4ce (patch) | |
| tree | 1c3775d5aba426669a0ea0b8821a7b4b0808aab0 /lua | |
| parent | 81dcf7de91c1866d565f7aa9eb38f7fbd1cd7ad7 (diff) | |
| download | null-browser-031b22e0bb0f1d132731aea3776917731a8ab4ce.tar.gz null-browser-031b22e0bb0f1d132731aea3776917731a8ab4ce.zip | |
Add decorations.*.view lua api + support decoration views for open url
Diffstat (limited to '')
| -rw-r--r-- | lua/null-browser/api.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lua/null-browser/api.lua b/lua/null-browser/api.lua index f12d127..a414522 100644 --- a/lua/null-browser/api.lua +++ b/lua/null-browser/api.lua @@ -289,6 +289,7 @@ function web.view.scroll_to_bottom(view_id) return __internals.view_scroll_to_bo --- @field disable fun(opts?: DecorationOpts): nil --- @field set_enabled fun(enabled: boolean, opts?: DecorationOpts): nil --- @field is_enabled fun(opts?: DecorationOpts): boolean +--- @field view fun(opts?: DecorationOpts): number|nil --- --- @alias DecorationType number --- @@ -304,6 +305,9 @@ local function create_decoration_api(type) is_enabled = function(opts) return __internals.decorations_get_enabled(type, (opts or {}).win) end, + view = function(opts) + return __internals.decorations_get_view(type, (opts or {}).win) + end, } end |
