F1 keybind help: fixed formatting in wider terminals

main
bhagwan 2 years ago
parent 2d1862d034
commit 32b2cdb510

@ -1104,11 +1104,12 @@ function FzfWin.toggle_help()
-- rearrange lines so keymaps appear -- rearrange lines so keymaps appear
-- sequential within the same column -- sequential within the same column
lines = {} lines = {}
for i=1,height do for c=0, math.floor(vim.o.columns/(opts.column_width+#opts.column_padding)) do
lines[i] = keymaps[i] for i=1,height do
end local idx = height*c+i
for i=1,height do lines[i] = c==0 and keymaps[idx] or
lines[i] = lines[i] .. (keymaps[i+height] or '') lines[i] .. (keymaps[idx] or '')
end
end end
local winopts = { local winopts = {

Loading…
Cancel
Save