From 8850a05c80f3d8e089e7b1a40829ce1546f2eb36 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Fri, 22 Jun 2018 12:32:57 +0200 Subject: [PATCH] Support "file" type for funcref lists This makes it possible to use markers (s, v, t, etc.) to with lists generated by funcrefs. References #328 --- autoload/startify.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autoload/startify.vim b/autoload/startify.vim index bdf1785..ef40896 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -478,9 +478,12 @@ function! s:show_lists(lists) abort endif for entry in entries + let cmd = get(entry, 'cmd', 'edit') + let path = get(entry, 'path', '') + let type = get(entry, 'type', empty(path) ? 'special' : 'file') let index = s:get_index_as_string(b:startify.entry_number) call append('$', s:padding_left .'['. index .']'. repeat(' ', (3 - strlen(index))) . entry.line) - call s:register(line('$'), index, 'special', entry.cmd, '') + call s:register(line('$'), index, type, cmd, path) let b:startify.entry_number += 1 endfor call append('$', '')