forked from aniani/vim
patch 8.2.4617: no completion for :scriptnames
Problem: No completion for :scriptnames. Solution: Implement :scriptnames completion. (Yegappan Lakshmanan, closes #10005)
This commit is contained in:
committed by
Bram Moolenaar
parent
98b7fe725e
commit
454ce6737c
@@ -1769,14 +1769,20 @@ ex_scriptnames(exarg_T *eap)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (eap->addr_count > 0)
|
||||
if (eap->addr_count > 0 || *eap->arg != NUL)
|
||||
{
|
||||
// :script {scriptId}: edit the script
|
||||
if (!SCRIPT_ID_VALID(eap->line2))
|
||||
if (eap->addr_count > 0 && !SCRIPT_ID_VALID(eap->line2))
|
||||
emsg(_(e_invalid_argument));
|
||||
else
|
||||
{
|
||||
eap->arg = SCRIPT_ITEM(eap->line2)->sn_name;
|
||||
if (eap->addr_count > 0)
|
||||
eap->arg = SCRIPT_ITEM(eap->line2)->sn_name;
|
||||
else
|
||||
{
|
||||
expand_env(eap->arg, NameBuff, MAXPATHL);
|
||||
eap->arg = NameBuff;
|
||||
}
|
||||
do_exedit(eap, NULL);
|
||||
}
|
||||
return;
|
||||
|
Reference in New Issue
Block a user