File plugin/inccomplete.vim changed (mode: 100644) (index c588fbb..1e1ce74) |
1 |
1 |
" Name: inccomplete |
" Name: inccomplete |
2 |
2 |
" Author: xaizek <xaizek@posteo.net> |
" Author: xaizek <xaizek@posteo.net> |
3 |
|
" Version: 1.8.48 |
|
|
3 |
|
" Version: 1.8.49 |
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) |
196 |
196 |
continue |
continue |
197 |
197 |
endif |
endif |
198 |
198 |
|
|
199 |
|
if isdirectory(l:increc[0].'/'.l:increc[1]) |
|
|
199 |
|
let l:isdir = isdirectory(l:increc[0].'/'.l:increc[1]) |
|
200 |
|
if l:isdir |
200 |
201 |
let l:slashidx = strridx(l:increc[1], l:sl2) |
let l:slashidx = strridx(l:increc[1], l:sl2) |
201 |
202 |
if l:increc[1][l:slashidx + 1] == '.' |
if l:increc[1][l:slashidx + 1] == '.' |
202 |
203 |
continue |
continue |
|
... |
... |
function! ICComplete(findstart, base) |
209 |
210 |
let l:slash = '' |
let l:slash = '' |
210 |
211 |
endif |
endif |
211 |
212 |
|
|
|
213 |
|
" XXX: set 'kind' to 'd'/'f' to indicate directory/file? |
212 |
214 |
let l:item = { |
let l:item = { |
213 |
215 |
\ 'word': l:increc[1].l:strend, |
\ 'word': l:increc[1].l:strend, |
214 |
216 |
\ 'abbr': l:increc[1].l:slash, |
\ 'abbr': l:increc[1].l:slash, |
215 |
217 |
\ 'menu': s:ICModifyPath(l:increc[0]), |
\ 'menu': s:ICModifyPath(l:increc[0]), |
216 |
|
\ 'dup': 0 |
|
|
218 |
|
\ 'dup': 0, |
|
219 |
|
\ 'dir': l:isdir |
217 |
220 |
\} |
\} |
218 |
221 |
call add(l:comlst, l:item) |
call add(l:comlst, l:item) |
219 |
222 |
endfor |
endfor |
|
... |
... |
function s:SortList(lst) |
239 |
242 |
endif |
endif |
240 |
243 |
endfunction |
endfunction |
241 |
244 |
function s:IgnoreCaseComparer(i1, i2) |
function s:IgnoreCaseComparer(i1, i2) |
|
245 |
|
if a:i1['dir'] != a:i2['dir'] |
|
246 |
|
return a:i1['dir'] ? -1 : 1 |
|
247 |
|
endif |
242 |
248 |
return a:i1['abbr'] == a:i2['abbr'] ? 0 : |
return a:i1['abbr'] == a:i2['abbr'] ? 0 : |
243 |
249 |
\ (a:i1['abbr'] > a:i2['abbr'] ? 1 : -1) |
\ (a:i1['abbr'] > a:i2['abbr'] ? 1 : -1) |
244 |
250 |
endfunction |
endfunction |
245 |
251 |
function s:Comparer(i1, i2) |
function s:Comparer(i1, i2) |
|
252 |
|
if a:i1['dir'] != a:i2['dir'] |
|
253 |
|
return a:i1['dir'] ? -1 : 1 |
|
254 |
|
endif |
246 |
255 |
return a:i1['abbr'] ==# a:i2['abbr'] ? 0 : |
return a:i1['abbr'] ==# a:i2['abbr'] ? 0 : |
247 |
256 |
\ (a:i1['abbr'] ># a:i2['abbr'] ? 1 : -1) |
\ (a:i1['abbr'] ># a:i2['abbr'] ? 1 : -1) |
248 |
257 |
endfunction |
endfunction |