|
|
@@ -390,24 +390,26 @@ endfunction
|
|
|
|
|
|
" Function: s:show_bookmarks {{{1
|
|
|
function! s:show_bookmarks(cnt) abort
|
|
|
- if exists('g:startify_bookmarks')
|
|
|
- if exists('s:last_message')
|
|
|
- call s:print_section_header()
|
|
|
- endif
|
|
|
+ if !exists('g:startify_bookmarks')
|
|
|
+ return a:cnt
|
|
|
+ endif
|
|
|
|
|
|
- let cnt = a:cnt
|
|
|
+ if exists('s:last_message')
|
|
|
+ call s:print_section_header()
|
|
|
+ endif
|
|
|
|
|
|
- for fname in g:startify_bookmarks
|
|
|
- let index = s:get_index_as_string(cnt)
|
|
|
+ let cnt = a:cnt
|
|
|
|
|
|
- call append('$', ' ['. index .']'. repeat(' ', (3 - strlen(index))) . fname)
|
|
|
- execute 'nnoremap <buffer>' index ':edit' fnameescape(fname) '<bar> call <sid>check_user_options()<cr>'
|
|
|
+ for fname in g:startify_bookmarks
|
|
|
+ let index = s:get_index_as_string(cnt)
|
|
|
|
|
|
- let cnt += 1
|
|
|
- endfor
|
|
|
+ call append('$', ' ['. index .']'. repeat(' ', (3 - strlen(index))) . fname)
|
|
|
+ execute 'nnoremap <buffer>' index ':edit' fnameescape(fname) '<bar> call <sid>check_user_options()<cr>'
|
|
|
|
|
|
- call append('$', '')
|
|
|
- endif
|
|
|
+ let cnt += 1
|
|
|
+ endfor
|
|
|
+
|
|
|
+ call append('$', '')
|
|
|
|
|
|
return cnt
|
|
|
endfunction
|