Skip to content

Commit

Permalink
Revert "make utf8len work with utf8 (#77)" (#79)
Browse files Browse the repository at this point in the history
This reverts commit bc1505b.
  • Loading branch information
altermo authored Aug 6, 2023
1 parent bc1505b commit 6d66ed1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/codeium/source.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ local function utf8len(str)
if str == "" or not str then
return 0
end

return #vim.str_utf_pos(str)
-- TODO: Figure out how to convert the document encoding to UTF8 length
-- Bonus points for doing it with raw codepoints instead of converting the
-- string wholesale
return string.len(str)
end

local function codeium_to_cmp(comp, offset, right)
Expand Down

0 comments on commit 6d66ed1

Please sign in to comment.