From 031b22e0bb0f1d132731aea3776917731a8ab4ce Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Fri, 25 Jul 2025 23:17:02 +0530 Subject: Add decorations.*.view lua api + support decoration views for open url --- lua/null-browser/api.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lua') 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 -- cgit v1.3.1