Skip to content

Commit

Permalink
Use the global namespace if the specification was not found
Browse files Browse the repository at this point in the history
  • Loading branch information
dstein64 committed Oct 1, 2024
1 parent 2a0ba55 commit 75a91f6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/scrollview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,12 @@ local get_normal_highlight = function(winid)
hl_spec = api.nvim_get_hl(
hl_ns, {name = 'Normal', create = false, link = true})
end
-- Use the global namespace if the specification was not found.
if vim.tbl_isempty(hl_spec) then
local hl_name = is_float and 'NormalFloat' or 'Normal'
hl_spec = api.nvim_get_hl(
0, {name = hl_name, create = false, link = true})
end
local visited = {}
while not vim.tbl_isempty(hl_spec)
and hl_spec.link ~= nil
Expand Down

0 comments on commit 75a91f6

Please sign in to comment.