Skip to content

Commit ed0e140

Browse files
authored
fix: Initialise ranges (#265)
Resolves a bug where windows without titles would error.
1 parent ef54bc2 commit ed0e140

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/plenary/window/border.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ local create_horizontal_line = function(title, pos, width, left_char, mid_char,
4646
string.rep(mid_char, width - title_len - left_start),
4747
right_char
4848
)
49-
local ranges
49+
local ranges = {}
5050
if title_len ~= 0 then
5151
-- Need to calculate again due to multi-byte characters
5252
local r_start = string.len(left_char) + math.max(left_start, 0) * string.len(mid_char)

0 commit comments

Comments
 (0)