Sfoglia il codice sorgente

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
Marco Hinz 7 anni fa
parent
commit
8850a05c80
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 4 1
      autoload/startify.vim

+ 4 - 1
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('$', '')