Browse Source

Remember mappings until <cr> is hit

A certain branch tried to execute buffer-local mappings after calling
:enew. Therefore the mappings didn't exist anymore.

References #30.
Marco Hinz 12 years ago
parent
commit
e0b295a725
1 changed files with 2 additions and 3 deletions
  1. 2 3
      autoload/startify.vim

+ 2 - 3
autoload/startify.vim

@@ -90,8 +90,7 @@ function! startify#insane_in_the_membrane() abort
     execute 'nnoremap <buffer><silent> '. g:startify_empty_buffer_key .' :enew<cr>'
   endif
 
-  autocmd! startify *
-  autocmd  startify CursorMoved <buffer> call s:set_cursor()
+  autocmd startify CursorMoved <buffer> call s:set_cursor()
 
   call cursor((s:show_special ? 4 : 2) + s:offset_header, 5)
 endfunction
@@ -354,8 +353,8 @@ endfunction
 
 " Function: s:open_buffers {{{1
 function! s:open_buffers(cword) abort
-  enew
   if exists('s:marked') && !empty(s:marked)
+    enew
     for i in range(len(s:marked))
       for val in values(s:marked)
         if val[0] == i