Skip to content

Commit 89c81d1

Browse files
committed
Move prefix and suffix out of loop.
1 parent 95b4070 commit 89c81d1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

autoload/startuptime.vim

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,19 +181,19 @@ function! s:SetFile() abort
181181
" On Windows, to escape '[' with a backslash below, the character has to be
182182
" removed from 'isfname' (:help wilcard).
183183
set isfname-=[
184+
" Prepend backslash to the prefix to avoid the special wildcard meaning
185+
" (:help wildcard). Two backslashes are necessary on Windows, since Vim
186+
" removes backslashes before special characters (:help dos-backslash).
187+
" Issue #9.
188+
let l:prefix = has('win32') ? '\\[' : '\['
189+
let l:suffix = ']'
184190
let l:n = 0
185191
while 1
186192
try
187193
let l:text = 'startuptime'
188194
if l:n ># 0
189195
let l:text .= '.' . l:n
190196
endif
191-
" Prepend backslash to the prefix to avoid the special wildcard meaning
192-
" (:help wildcard). Two backslashes are necessary on Windows, since Vim
193-
" removes backslashes before special characters (:help dos-backslash).
194-
" Issue #9.
195-
let l:prefix = has('win32') ? '\\[' : '\['
196-
let l:suffix = ']'
197197
execute 'silent file ' . l:prefix . l:text . l:suffix
198198
catch
199199
let l:n += 1

0 commit comments

Comments
 (0)