File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -449,15 +449,15 @@ function M.help()
449449 ' ' ,
450450 ' ### Subcommands' ,
451451 ' ' ,
452- ' | Command | Description |' ,
453- ' |--------------|------------------------------------------------------- |' ,
452+ ' | Command | Description |' ,
453+ ' |--------------|-------------|' ,
454454 }, false )
455455
456456 if not state .windows or not state .windows .output_win then
457457 return
458458 end
459459
460- local max_desc_length = math.floor (( vim .api .nvim_win_get_width (state .windows .output_win ) / 1.3 ) - 5 )
460+ local max_desc_length = vim .api .nvim_win_get_width (state .windows .output_win ) - 22
461461
462462 local sorted_commands = vim .tbl_keys (M .commands )
463463 table.sort (sorted_commands )
@@ -468,7 +468,7 @@ function M.help()
468468 if # desc > max_desc_length then
469469 desc = desc :sub (1 , max_desc_length - 3 ) .. ' ...'
470470 end
471- table.insert (msg , string.format (' | %-12s | %-53s |' , name , desc ))
471+ table.insert (msg , string.format (' | %-12s | %-' .. max_desc_length .. ' s |' , name , desc ))
472472 end
473473
474474 table.insert (msg , ' ' )
You can’t perform that action at this time.
0 commit comments