mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Opts.wrap_at is sometimes a bool, ensure it falls back to a valid number in the call to math.min
This commit is contained in:
parent
f6ac375604
commit
6d066af27a
@ -807,7 +807,7 @@ function M.fancy_floating_markdown(contents, opts)
|
|||||||
h.start = h.start + i - 1
|
h.start = h.start + i - 1
|
||||||
h.finish = h.finish + i - 1
|
h.finish = h.finish + i - 1
|
||||||
if h.finish + 1 <= #stripped then
|
if h.finish + 1 <= #stripped then
|
||||||
table.insert(stripped, h.finish + 1, string.rep("─", math.min(width, opts.wrap_at)))
|
table.insert(stripped, h.finish + 1, string.rep("─", math.min(width, opts.wrap_at or width)))
|
||||||
height = height + 1
|
height = height + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user