Skip to content

Commit

Permalink
Use correct text width for layout (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
anekos authored Aug 8, 2024
1 parent c6ba324 commit c00a24e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/startup/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -319,14 +319,14 @@ function startup.mapping_names(mappings)
for _, mapping in pairs(mappings) do
if settings.options.mapping_keys then
local space = utils.spaces(
length - #parse_mapping(mapping[3]) - #mapping[1]
length - #parse_mapping(mapping[3]) - vim.fn.strdisplaywidth(mapping[1])
)
table.insert(
mapnames,
mapping[1] .. space .. parse_mapping(mapping[3])
)
else
local space = utils.spaces(length - #mapping[1])
local space = utils.spaces(length - vim.fn.strdisplaywidth(mapping[1]))
table.insert(mapnames, mapping[1] .. space)
end
end
Expand Down

0 comments on commit c00a24e

Please sign in to comment.