Skip to content

Commit 337744e

Browse files
committed
refactor: use vim.keycode if it's available
1 parent 71c429a commit 337744e

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)