diff options
author | max397574 <[email protected]> | 2021-12-10 10:34:15 +0100 |
---|---|---|
committer | max397574 <[email protected]> | 2021-12-10 10:34:15 +0100 |
commit | bec1471e38a1de0c60b0feaf89dd008a515888cf (patch) | |
tree | db9f59078a73f196c53426b54b08b4c1f206e1b0 /lua | |
parent | e1a5182c405fd8beafdf479bf5c0abcc750c010f (diff) |
fix(utils): no error if less than 10 oldfiles
Diffstat (limited to 'lua')
-rw-r--r-- | lua/startup/utils.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/startup/utils.lua b/lua/startup/utils.lua index 535d7f9..c549d95 100644 --- a/lua/startup/utils.lua +++ b/lua/startup/utils.lua @@ -263,7 +263,7 @@ function U.oldfiles_mappings() if not all_oldfiles then return end - for i = 0, 9, 1 do + for i = 0, #all_oldfiles>=10 and 9 or #all_oldfiles-1, 1 do vim.api.nvim_buf_set_keymap( 0, "n", |