Mercurial > vim-gutentags
comparison autoload/gutentags/ctags.vim @ 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 | 0b4ccd0deceb |
children | 685b81826b68 |
comparison
equal
deleted
inserted
replaced
183:bd641fccdae4 | 184:3cd4597fb86b |
---|---|
114 endif | 114 endif |
115 let l:cmd .= ' -s "' . l:cur_file_path . '"' | 115 let l:cmd .= ' -s "' . l:cur_file_path . '"' |
116 else | 116 else |
117 let l:file_list_cmd = gutentags#get_project_file_list_cmd(l:actual_proj_dir) | 117 let l:file_list_cmd = gutentags#get_project_file_list_cmd(l:actual_proj_dir) |
118 if !empty(l:file_list_cmd) | 118 if !empty(l:file_list_cmd) |
119 let l:suffopts = matchstrpos(l:file_list_cmd, '///') | 119 if match(l:file_list_cmd, '///') > 0 |
120 if l:suffopts[1] > 0 | 120 let l:suffopts = split(l:file_list_cmd, '///') |
121 let l:suffoptstr = strpart(l:file_list_cmd, l:suffopts[2]) | 121 let l:suffoptstr = l:suffopts[1] |
122 let l:file_list_cmd = strpart(l:file_list_cmd, 0, l:suffopts[1]) | 122 let l:file_list_cmd = l:suffopts[0] |
123 if l:suffoptstr == 'absolute' | 123 if l:suffoptstr == 'absolute' |
124 let l:cmd .= ' -A' | 124 let l:cmd .= ' -A' |
125 endif | 125 endif |
126 endif | 126 endif |
127 let l:cmd .= ' -L ' . '"' . l:file_list_cmd. '"' | 127 let l:cmd .= ' -L ' . '"' . l:file_list_cmd. '"' |