view compiler/vimcrosoftsln.vim @ 8:d5ddd9ffaf11

Don't crash trying to list a solution file if no cache exists yet.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 24 Sep 2020 22:56:34 -0700
parents 5d2c0db51914
children 096e80c13781
line wrap: on
line source

" Compiler file for Visual Studio
" Compiler: Visual Studio
" Maintainer: Ludovic Chabant <https://ludovic.chabant.com>

if exists("current_compiler")
    finish
endif
let current_compiler = "vimcrosoftsln"

let s:keepcpo = &cpo

let s:prgargs = ''
if !empty(g:vimcrosoft_temp_compiler_args__)
    let s:tmpargs = map(
                \copy(g:vimcrosoft_temp_compiler_args__),
                \{idx, val -> escape(val, ' \"')})
    let s:prgargs = '\ '.join(s:tmpargs, '\ ')
endif

let s:prgcmdline = fnameescape('"'.g:vimcrosoft_msbuild_path.'"').s:prgargs
call vimcrosoft#trace("Setting makeprg to: ".s:prgcmdline)
execute "CompilerSet makeprg=".s:prgcmdline

CompilerSet errorformat&

let &cpo = s:keepcpo
unlet s:keepcpo