Skip to content

Commit 8354891

Browse files
committed
Surround event with double quotes if there are already single quotes.
1 parent 1a5bd29 commit 8354891

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

autoload/startuptime.vim

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,16 @@ function! startuptime#GotoFile() abort
598598
return
599599
endif
600600
endif
601-
let l:nofile = s:Surround(l:item.event, "'")
601+
let l:nofile = l:item.event
602+
let l:surround = ''
603+
if stridx(l:nofile, "'") ==# -1
604+
let l:surround = "'"
605+
elseif stridx(l:nofile, '"') ==# -1
606+
let l:surround = '"'
607+
endif
608+
if !empty(l:surround)
609+
let l:nofile = s:Surround(l:item.event, l:surround)
610+
endif
602611
endif
603612
let l:message = 'vim-startuptime: no file for ' . l:nofile
604613
call s:Echo([['WarningMsg', l:message]])

0 commit comments

Comments
 (0)