diff --git a/scripts/download_bin.vim b/scripts/download_bin.vim index d3b32c1..0f6346f 100644 --- a/scripts/download_bin.vim +++ b/scripts/download_bin.vim @@ -3,6 +3,14 @@ " " Invoked by Dein / vim-plug build hooks: " vim -e -s -c "source scripts/download_bin.vim" -c "q" +" +" That invocation runs in 'compatible' mode, where leading-backslash line +" continuations aren't recognised (they'd raise E10, and any error in silent +" Ex mode makes Vim exit non-zero — a spurious build failure). Reset +" 'cpoptions' to the Vim default for the duration so the script parses, and +" restore it at the end. +let s:cpo_save = &cpo +set cpo&vim let s:plugin_dir = fnamemodify(resolve(expand(':p')), ':h:h') let s:bin_dir = s:plugin_dir . '/bin' @@ -89,3 +97,5 @@ else echohl ErrorMsg | echom 'nuwiki: install failed' | echohl None endif endif + +let &cpo = s:cpo_save