Skip to content

Commit a7d5b3d

Browse files
committed
fix the <enter> mapping
It now acts the same as the ActivateNode mapping ('o' by default) again. This was broken in the big refactor. Fixes preservim#222
1 parent cc0777b commit a7d5b3d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

autoload/nerdtree.vim

+3-3
Original file line numberDiff line numberDiff line change
@@ -1228,11 +1228,11 @@ endfunction
12281228

12291229
"FUNCTION: nerdtree#bindMappings() {{{2
12301230
function! nerdtree#bindMappings()
1231-
"make <cr> do the same as the default 'o' mapping
1232-
exec "nnoremap <silent> <buffer> <cr> :call <SID>KeyMap_Invoke('". g:NERDTreeMapActivateNode ."')<cr>"
1233-
12341231
call g:NERDTreeKeyMap.BindAll()
12351232

1233+
"make <cr> do the same as the default 'o' mapping
1234+
exec "nnoremap <silent> <buffer> <cr> :call nerdtree#invokeKeyMap('". g:NERDTreeMapActivateNode ."')<cr>"
1235+
12361236
command! -buffer -nargs=? Bookmark :call <SID>bookmarkNode('<args>')
12371237
command! -buffer -complete=customlist,nerdtree#completeBookmarks -nargs=1 RevealBookmark :call <SID>revealBookmark('<args>')
12381238
command! -buffer -complete=customlist,nerdtree#completeBookmarks -nargs=1 OpenBookmark :call <SID>openBookmark('<args>')

0 commit comments

Comments
 (0)