Skip to content

Commit 55fff14

Browse files
committed
fix: Fixed incorrect function names
1 parent 6dd4c57 commit 55fff14

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lua/bars/components/statusline.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ slC.bufname = function (buffer, _, main_config)
162162

163163
return string.format(
164164
"%s%s%s%s",
165-
vim.fn.strcharcomponent(name, 0, math.max(available_len, 2)),
165+
vim.fn.strcharpart(name, 0, math.max(available_len, 2)),
166166
truncate_symbol,
167167
ext ~= "" and "." or "",
168168
ext ~= "" and ext or ""

lua/bars/components/tabline.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ tlC.bufs = function (config)
242242

243243
return string.format(
244244
"%s%s%s%s",
245-
vim.fn.strcharcomponent(name, 0, math.max(available_len, 2)),
245+
vim.fn.strcharpart(name, 0, math.max(available_len, 2)),
246246
truncate_symbol,
247247
ext ~= "" and "." or "",
248248
ext ~= "" and ext or ""

lua/bars/utils.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@ utils.truncate_path = function (path, opts)
211211
end
212212
elseif _o ~= nil and vim.list_contains(opts.raw_segmants, component) == false then
213213
if string.match(component, "^%.") then
214-
component = vim.fn.strcharcomponent(component, 0, opts.length + 1);
214+
component = vim.fn.strcharpart(component, 0, opts.length + 1);
215215
else
216-
component = vim.fn.strcharcomponent(component, 0, opts.length);
216+
component = vim.fn.strcharpart(component, 0, opts.length);
217217
end
218218
end
219219

0 commit comments

Comments
 (0)