From 308b0088a864c4711a96e45b6734cf9294074f65 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 16 Feb 2024 21:00:10 -0500 Subject: [PATCH] Add a path separator at the end of directory completions. --- autoload/startuptime.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoload/startuptime.vim b/autoload/startuptime.vim index 0a79462..4d1d585 100644 --- a/autoload/startuptime.vim +++ b/autoload/startuptime.vim @@ -25,6 +25,8 @@ let s:preamble_line_count = 2 let s:startuptime_startup_key = 'startup:' +let s:pathsep = (has('win32') || has('win64')) ? '\\' : '/' + " ************************************************* " * Utils " ************************************************* @@ -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