Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit 176e32c

Browse files
committed
Cleanup.
1 parent c9fc0d4 commit 176e32c

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

plugin/syntastic.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if has('reltime')
1919
lockvar! g:_SYNTASTIC_START
2020
endif
2121

22-
let g:_SYNTASTIC_VERSION = '3.6.0-108'
22+
let g:_SYNTASTIC_VERSION = '3.6.0-109'
2323
lockvar g:_SYNTASTIC_VERSION
2424

2525
" Sanity checks {{{1

syntax_checkers/java/javac.vim

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,17 @@ endif
7373

7474
" }}}1
7575

76+
" Constants {{{1
77+
78+
let s:_FILE_SHORTCUTS = {
79+
\ '%FILE_PATH%': '%:p',
80+
\ '%FILE_NAME%': '%:t',
81+
\ '%FILE_DIR%': '%:p:h',
82+
\ }
83+
lockvar! s:_FILE_SHORTCUTS
84+
85+
" }}}1
86+
7687
command! SyntasticJavacEditClasspath call s:EditClasspath()
7788

7889
if g:syntastic_java_javac_config_file_enabled
@@ -131,10 +142,8 @@ function! SyntaxCheckers_java_javac_GetLocList() dict " {{{1
131142
if g:syntastic_java_javac_custom_classpath_command !=# ''
132143
" Pre-process the classpath command string a little.
133144
let classpath_command = g:syntastic_java_javac_custom_classpath_command
134-
for sub in [['\V%FILE_PATH%', expand('%:p')],
135-
\ ['\V%FILE_NAME%', expand('%:t')],
136-
\ ['\V%FILE_DIR%', expand('%:p:h')]]
137-
let classpath_command = substitute(classpath_command, sub[0], syntastic#util#shescape(sub[1]), 'g')
145+
for [key, val] in items(s:_FILE_SHORTCUTS)
146+
let classpath_command = substitute(classpath_command, '\V' . key, syntastic#util#shexpand(val), 'g')
138147
endfor
139148
let lines = syntastic#util#system(classpath_command)
140149
if syntastic#util#isRunningWindows() || has('win32unix')

0 commit comments

Comments
 (0)