aboutsummaryrefslogtreecommitdiff
path: root/vim/autoload/option.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-04-05 22:18:42 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-04-05 22:18:42 +1200
commitb27e445dd9bddb8b7f0cd820cd97ee4661db99c8 (patch)
tree4f074cd72a21532e0866a69064ca60a395c1998b /vim/autoload/option.vim
parentMerge branch 'release/v8.13.0' (diff)
parentUpdate PGP key (diff)
downloaddotfiles-b27e445dd9bddb8b7f0cd820cd97ee4661db99c8.tar.gz
dotfiles-b27e445dd9bddb8b7f0cd820cd97ee4661db99c8.zip
Merge branch 'release/v8.14.0'v8.14.0
* release/v8.14.0: Update PGP key Vim: Use more correct method of escaping :set RHS Check for existence of 'colorcolumn' option
Diffstat (limited to 'vim/autoload/option.vim')
-rw-r--r--vim/autoload/option.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/vim/autoload/option.vim b/vim/autoload/option.vim
index 5ff44ced..c44cf94b 100644
--- a/vim/autoload/option.vim
+++ b/vim/autoload/option.vim
@@ -9,3 +9,9 @@ function! option#Split(expr, ...) abort
let parts = split(a:expr, '\\\@<!,[, ]*', keepempty)
return map(parts, 'substitute(v:val, ''\\,'', '','', ''g'')')
endfunction
+
+" Escape the right-hand side of a :set option value
+"
+function! option#Escape(expr) abort
+ return escape(a:expr, ' |"\')
+endfunction