# HG changeset patch # User Stephen Kent # Date 1492882350 25200 # Node ID 3cd4597fb86b0f4867ae8b2466c248681d5b7909 # Parent bd641fccdae4a987dff5d3b9ad1f27609bfaf92b 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 diff -r bd641fccdae4 -r 3cd4597fb86b autoload/gutentags/ctags.vim --- 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