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
This commit is contained in:
Marco Hinz 2018-06-22 12:32:57 +02:00
parent 0b300f411f
commit 8850a05c80
No known key found for this signature in database
GPG key ID: 1C980A1B657B4A4F

View file

@ -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('$', '')