Mercurial > vim-gutentags
changeset 184:3cd4597fb86b
Replace matchstrpos() with match() + split() for backwards compatibility
matchstrpos() was added to Vim as patch 7.4.1685:
http://ftp.vim.org/vim/patches/7.4/7.4.1685
Older but still vendor-supported operating systems (such as Ubuntu 14.04
LTS and derivatives) ship versions of Vim that predate this patch.
Replacing matchstrpos() allows vim-gutentags to continue to work with
these older versions of Vim.
Issue: https://github.com/ludovicchabant/vim-gutentags/issues/114
author | Stephen Kent <smkent@smkent.net> |
---|---|
date | Sat, 22 Apr 2017 10:32:30 -0700 |
parents | bd641fccdae4 |
children | 685b81826b68 becdd3c867c7 676fe2ea919f |
files | autoload/gutentags/ctags.vim |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/autoload/gutentags/ctags.vim Tue Apr 18 21:46:57 2017 -0700 +++ b/autoload/gutentags/ctags.vim Sat Apr 22 10:32:30 2017 -0700 @@ -116,10 +116,10 @@ else let l:file_list_cmd = gutentags#get_project_file_list_cmd(l:actual_proj_dir) if !empty(l:file_list_cmd) - let l:suffopts = matchstrpos(l:file_list_cmd, '///') - if l:suffopts[1] > 0 - let l:suffoptstr = strpart(l:file_list_cmd, l:suffopts[2]) - let l:file_list_cmd = strpart(l:file_list_cmd, 0, l:suffopts[1]) + if match(l:file_list_cmd, '///') > 0 + let l:suffopts = split(l:file_list_cmd, '///') + let l:suffoptstr = l:suffopts[1] + let l:file_list_cmd = l:suffopts[0] if l:suffoptstr == 'absolute' let l:cmd .= ' -A' endif