Skip to content

Commit

Permalink
Require zindex to be larger than zero.
Browse files Browse the repository at this point in the history
  • Loading branch information
dstein64 committed Jan 10, 2024
1 parent a31310b commit 3572a67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doc/scrollview.txt
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ scrollview_winblend |Number| specifying the level of transparency for

scrollview_zindex *scrollview_zindex*
|Number| specifying the z-index for scrollbars and signs.
Defaults to `40`.
Must be larger than zero. Defaults to `40`.

*scrollview-signs-configuration*
Sign Configuration Variables ~
Expand Down
3 changes: 3 additions & 0 deletions lua/scrollview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,9 @@ local should_show = function(winid)
if is_scrollview_window(winid) then
return false
end
if vim.g.scrollview_zindex <= 0 then
return false
end
local bufnr = api.nvim_win_get_buf(winid)
local buf_filetype = api.nvim_buf_get_option(bufnr, 'filetype')
local winheight = get_window_height(winid)
Expand Down

0 comments on commit 3572a67

Please sign in to comment.