@@ -1545,22 +1545,18 @@ M.open_buf = function(file_name, target, kind, toggle)
15451545 if target == M .BufTarget .popup then
15461546 local old_buf = M ._H .get_buffer (file_name )
15471547
1548- buf , win , close , _ = M ._H .create_popup (
1549- old_buf ,
1550- M ._Name .. " Popup" ,
1551- function (w , h )
1552- local top = M .config .style_popup_margin_top or 2
1553- local bottom = M .config .style_popup_margin_bottom or 8
1554- local left = M .config .style_popup_margin_left or 1
1555- local right = M .config .style_popup_margin_right or 1
1556- local max_width = M .config .style_popup_max_width or 160
1557- local ww = math.min (w - (left + right ), max_width )
1558- local wh = h - (top + bottom )
1559- return ww , wh , top , (w - ww ) / 2
1560- end ,
1561- { on_leave = false , escape = false , persist = true },
1562- { border = M .config .style_popup_border or " single" }
1563- )
1548+ buf , win , close , _ = M ._H .create_popup (old_buf , M ._Name .. " Popup" , function (w , h )
1549+ local top = M .config .style_popup_margin_top or 2
1550+ local bottom = M .config .style_popup_margin_bottom or 8
1551+ local left = M .config .style_popup_margin_left or 1
1552+ local right = M .config .style_popup_margin_right or 1
1553+ local max_width = M .config .style_popup_max_width or 160
1554+ local ww = math.min (w - (left + right ), max_width )
1555+ local wh = h - (top + bottom )
1556+ return ww , wh , top , (w - ww ) / 2
1557+ end , { on_leave = false , escape = false , persist = true }, {
1558+ border = M .config .style_popup_border or " single" ,
1559+ })
15641560
15651561 if not toggle then
15661562 M ._toggle_add (M ._toggle_kind .popup , { win = win , buf = buf , close = close })
0 commit comments