Skip to content

Commit

Permalink
Merge pull request #166 from mortang2410/master
Browse files Browse the repository at this point in the history
Check for empty dictionary
  • Loading branch information
jarun committed May 23, 2023
2 parents 46bb835 + 64bd875 commit e0104e3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ftplugin/nnn.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ if exists('b:nnn_ftplugin')
endif
let b:nnn_ftplugin = 1

for key in keys(g:nnn#action)
execute 'tnoremap <nowait><buffer><silent>' key '<c-\><c-n>:<c-u>call nnn#select_action("'.substitute(key, '<', '<lt>', 'g').'")<cr>'
endfor
if !empty(g:nnn#action)
for key in keys(g:nnn#action)
execute 'tnoremap <nowait><buffer><silent>' key '<c-\><c-n>:<c-u>call nnn#select_action("'.substitute(key, '<', '<lt>', 'g').'")<cr>'
endfor
endif

if g:nnn#set_default_mappings
tnoremap <buffer><silent> <C-w> <C-\><C-n><C-w>
Expand Down

0 comments on commit e0104e3

Please sign in to comment.