Skip to content

Commit

Permalink
fix(configs): error when using 'buffer' scope in empty buffer (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
bekaboo committed Jan 15, 2024
1 parent 4bec1fa commit c3eedd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/deadcolumn/configs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ local scope_fn = {
current_linenr + range,
false
)
return math.max(unpack(vim.tbl_map(vim.fn.strdisplaywidth, lines)))
return math.max(0, unpack(vim.tbl_map(vim.fn.strdisplaywidth, lines)))
end,
visible = function()
local lines = vim.api.nvim_buf_get_lines(
Expand Down

0 comments on commit c3eedd2

Please sign in to comment.