File plugin/inccomplete.vim changed (mode: 100644) (index d55ec91..7b646ce) |
1 |
1 |
" Name: inccomplete |
" Name: inccomplete |
2 |
2 |
" Author: xaizek <xaizek@gmail.com> |
" Author: xaizek <xaizek@gmail.com> |
3 |
|
" Version: 1.6.24 |
|
|
3 |
|
" Version: 1.6.25 |
4 |
4 |
" License: Same terms as Vim itself (see :help license) |
" License: Same terms as Vim itself (see :help license) |
5 |
5 |
" |
" |
6 |
6 |
" See :help inccomplete for documentation. |
" See :help inccomplete for documentation. |
|
... |
... |
function! ICComplete(findstart, base) |
139 |
139 |
let l:item = { |
let l:item = { |
140 |
140 |
\ 'word': l:increc[1].l:bracket, |
\ 'word': l:increc[1].l:bracket, |
141 |
141 |
\ 'abbr': l:increc[1].l:slash, |
\ 'abbr': l:increc[1].l:slash, |
142 |
|
\ 'menu': fnamemodify(l:increc[0], ':p:.'), |
|
143 |
|
\ 'dup': 1 |
|
|
142 |
|
\ 'menu': s:ICModifyPath(l:increc[0]), |
|
143 |
|
\ 'dup': 0 |
144 |
144 |
\} |
\} |
145 |
145 |
call add(l:comlst, l:item) |
call add(l:comlst, l:item) |
146 |
146 |
endfor |
endfor |
|
... |
... |
function s:Comparer(i1, i2) |
168 |
168 |
\ (a:i1['abbr'] ># a:i2['abbr'] ? 1 : -1) |
\ (a:i1['abbr'] ># a:i2['abbr'] ? 1 : -1) |
169 |
169 |
endfunction |
endfunction |
170 |
170 |
|
|
|
171 |
|
" modifies path correctly on Windows |
|
172 |
|
function! s:ICModifyPath(path) |
|
173 |
|
let l:drive_regexp = '\C^[a-zA-Z]:' |
|
174 |
|
let l:modified = fnamemodify(a:path, ':p:.') |
|
175 |
|
let l:prefix = '' |
|
176 |
|
if has('win32') && a:path =~ l:drive_regexp && !empty(l:modified) |
|
177 |
|
let l:prefix = matchstr(a:path, l:drive_regexp) |
|
178 |
|
endif |
|
179 |
|
return l:prefix.l:modified |
|
180 |
|
endfunction |
|
181 |
|
|
171 |
182 |
" filters search results |
" filters search results |
172 |
183 |
function! s:ICFilterIncLst(user, inclst, base) |
function! s:ICFilterIncLst(user, inclst, base) |
173 |
184 |
let [l:pos, l:sl1, l:sl2] = s:ICParsePath(a:base) |
let [l:pos, l:sl1, l:sl2] = s:ICParsePath(a:base) |
|
... |
... |
function! s:ICGetClangIncludes() |
331 |
342 |
let l:lst = split(b:clang_user_options.' '.g:clang_user_options, ' ') |
let l:lst = split(b:clang_user_options.' '.g:clang_user_options, ' ') |
332 |
343 |
let l:lst = filter(l:lst, 'v:val =~ "\\C^-I"') |
let l:lst = filter(l:lst, 'v:val =~ "\\C^-I"') |
333 |
344 |
let l:lst = map(l:lst, 'v:val[2:]') |
let l:lst = map(l:lst, 'v:val[2:]') |
|
345 |
|
let l:lst = map(l:lst, 'fnamemodify(v:val, ":p")') |
|
346 |
|
let l:lst = map(l:lst, 'substitute(v:val, "\\\\", "/", "g")') |
334 |
347 |
return l:lst |
return l:lst |
335 |
348 |
endfunction |
endfunction |
336 |
349 |
|
|