mirror of
https://github.com/tpope/vim-rhubarb.git
synced 2025-12-09 05:24:51 +08:00
@@ -3,8 +3,8 @@
|
|||||||
Author: Tim Pope <http://tpo.pe/>
|
Author: Tim Pope <http://tpo.pe/>
|
||||||
License: Same terms as Vim itself (see |license|)
|
License: Same terms as Vim itself (see |license|)
|
||||||
|
|
||||||
Use |i_CTRL-X_CTRL-O| to omni-complete GitHub issues when editing a commit
|
Use |i_CTRL-X_CTRL-O| to omni-complete GitHub issues or project collaborator
|
||||||
message.
|
usernames when editing a commit message.
|
||||||
|
|
||||||
ABOUT *rhubarb-about*
|
ABOUT *rhubarb-about*
|
||||||
|
|
||||||
|
|||||||
@@ -146,11 +146,15 @@ endfunction
|
|||||||
|
|
||||||
function! rhubarb#omnifunc(findstart,base)
|
function! rhubarb#omnifunc(findstart,base)
|
||||||
if a:findstart
|
if a:findstart
|
||||||
let existing = matchstr(getline('.')[0:col('.')-1],'#\d*$')
|
let existing = matchstr(getline('.')[0:col('.')-1],'#\d*$\|@[[:alnum:]-]*$')
|
||||||
return col('.')-1-strlen(existing)
|
return col('.')-1-strlen(existing)
|
||||||
endif
|
endif
|
||||||
try
|
try
|
||||||
return map(rhubarb#repo_request('issues'), '{"word": "#".v:val.number, "menu": v:val.title, "info": substitute(v:val.body,"\\r","","g")}')
|
if a:base =~# '^@'
|
||||||
|
return map(rhubarb#repo_request('collaborators'), '"@".v:val.login')
|
||||||
|
else
|
||||||
|
return map(rhubarb#repo_request('issues'), '{"word": "#".v:val.number, "menu": v:val.title, "info": substitute(v:val.body,"\\r","","g")}')
|
||||||
|
endif
|
||||||
catch /^\%(fugitive\|rhubarb\):/
|
catch /^\%(fugitive\|rhubarb\):/
|
||||||
return v:errmsg
|
return v:errmsg
|
||||||
endtry
|
endtry
|
||||||
|
|||||||
Reference in New Issue
Block a user