Skip to content

Commit

Permalink
Add a path separator at the end of directory completions.
Browse files Browse the repository at this point in the history
  • Loading branch information
dstein64 committed Feb 17, 2024
1 parent 791804e commit 308b008
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions autoload/startuptime.vim
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ let s:preamble_line_count = 2

let s:startuptime_startup_key = 'startup:'

let s:pathsep = (has('win32') || has('win64')) ? '\\' : '/'

" *************************************************
" * Utils
" *************************************************
Expand Down Expand Up @@ -1443,6 +1445,7 @@ function! startuptime#CompleteOptions(arglead, cmdline, cursorpos) abort
let l:str = substitute(l:str, '\\ ', ' ', 'g')
let l:matches = glob(l:str .. '*', v:true, v:true)
call map(l:matches, {_, x -> substitute(x, ' ', '\\ ', 'g')})
call map(l:matches, {_, x -> isdirectory(x) ? x .. s:pathsep : x})
call extend(l:args, l:matches)
endif
endif
Expand Down

0 comments on commit 308b008

Please sign in to comment.