Skip to content

Commit de01d4c

Browse files
authored
Merge pull request #106 from sha5010/main
fix: padding for multibytes characters in virtual text
2 parents a9ccdfd + 1d83918 commit de01d4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/tiny-inline-diagnostic/virtual_text.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ local utils = require("tiny-inline-diagnostic.utils")
2323
---@return string
2424
local function format_chunk_message(message, padding)
2525
local trimmed = utils.trim(message)
26-
local padding_needed = padding - vim.fn.strcharlen(trimmed)
26+
local padding_needed = padding - vim.fn.strdisplaywidth(trimmed)
2727
return trimmed .. string.rep(" ", math.max(0, padding_needed))
2828
end
2929

0 commit comments

Comments
 (0)