Skip to content

Commit 308b008

Browse files
committed
Add a path separator at the end of directory completions.
1 parent 791804e commit 308b008

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

autoload/startuptime.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ let s:preamble_line_count = 2
2525

2626
let s:startuptime_startup_key = 'startup:'
2727

28+
let s:pathsep = (has('win32') || has('win64')) ? '\\' : '/'
29+
2830
" *************************************************
2931
" * Utils
3032
" *************************************************
@@ -1443,6 +1445,7 @@ function! startuptime#CompleteOptions(arglead, cmdline, cursorpos) abort
14431445
let l:str = substitute(l:str, '\\ ', ' ', 'g')
14441446
let l:matches = glob(l:str .. '*', v:true, v:true)
14451447
call map(l:matches, {_, x -> substitute(x, ' ', '\\ ', 'g')})
1448+
call map(l:matches, {_, x -> isdirectory(x) ? x .. s:pathsep : x})
14461449
call extend(l:args, l:matches)
14471450
endif
14481451
endif

0 commit comments

Comments
 (0)