aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-12-30 17:57:05 +1300
committerTom Ryder <tom@sanctum.geek.nz>2019-12-30 17:57:05 +1300
commit94b8bfb2774d311ff70503fc6617a0cb4df33eea (patch)
tree2cfa2a42d2abe96410aaa8d191db280dafa176ed
parentPut a common string into a variable (diff)
downloaddotfiles-94b8bfb2774d311ff70503fc6617a0cb4df33eea.tar.gz
dotfiles-94b8bfb2774d311ff70503fc6617a0cb4df33eea.zip
Remove unneeded map#() autoload function
-rw-r--r--vim/autoload/map.vim12
-rw-r--r--vim/autoload/option.vim2
2 files changed, 1 insertions, 13 deletions
diff --git a/vim/autoload/map.vim b/vim/autoload/map.vim
deleted file mode 100644
index d4bd90a2..00000000
--- a/vim/autoload/map.vim
+++ /dev/null
@@ -1,12 +0,0 @@
-" We declare a wrapper around map() to allow us always to call it with
-" a Funcref as the second function parameter, which isn't directly supported
-" by map() until Vim v7.4.1989. If the running version is older than that,
-" apply string() to the Funcref to use the older calling convention.
-"
-" <https://github.com/vim/vim/releases/tag/v7.4.1989>
-"
-function! map#(list, Func) abort
- return has('patch-7.4.1989')
- \ ? map(a:list, a:Func)
- \ : map(a:list, string(a:Func).'(0, v:val)')
-endfunction
diff --git a/vim/autoload/option.vim b/vim/autoload/option.vim
index d203dfe8..a71503e1 100644
--- a/vim/autoload/option.vim
+++ b/vim/autoload/option.vim
@@ -4,5 +4,5 @@ function! option#Split(expr, ...) abort
endif
let keepempty = a:0 ? a:1 : 0
let parts = split(a:expr, '\\\@<!,[, ]*', keepempty)
- return map#(parts, 'substitute(v:val, ''\\,'', '','', ''g'')')
+ return map(parts, 'substitute(v:val, ''\\,'', '','', ''g'')')
endfunction