Skip to content

Commit 5ba76c9

Browse files
authored
Merge pull request #52 from declancm/keycode_refactor
refactor: use vim.keycode if it's available
2 parents 71c429a + 337744e commit 5ba76c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/cinnamon/utils.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ M.notify = function(message, level, options)
1515
end
1616

1717
---@param str string
18-
M.keycode = function(str)
19-
-- NOTE: This is a backwards-compatible vim.keycode
18+
---@return string
19+
M.keycode = vim.keycode or function(str)
2020
return vim.api.nvim_replace_termcodes(str, true, true, true)
2121
end
2222

0 commit comments

Comments
 (0)