Mercurial > vim
comparison src/scriptfile.c @ 28183:2b595cee4c85 v8.2.4617
patch 8.2.4617: no completion for :scriptnames
Commit: https://github.com/vim/vim/commit/454ce6737cadb82886f1fc0eb9e8666cc59ae42b
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Thu Mar 24 11:22:13 2022 +0000
patch 8.2.4617: no completion for :scriptnames
Problem: No completion for :scriptnames.
Solution: Implement :scriptnames completion. (Yegappan Lakshmanan,
closes #10005)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 24 Mar 2022 12:30:08 +0100 |
parents | b0b712d48225 |
children | 5bf82b918cb2 |
comparison
equal
deleted
inserted
replaced
28182:2846627df454 | 28183:2b595cee4c85 |
---|---|
1767 void | 1767 void |
1768 ex_scriptnames(exarg_T *eap) | 1768 ex_scriptnames(exarg_T *eap) |
1769 { | 1769 { |
1770 int i; | 1770 int i; |
1771 | 1771 |
1772 if (eap->addr_count > 0) | 1772 if (eap->addr_count > 0 || *eap->arg != NUL) |
1773 { | 1773 { |
1774 // :script {scriptId}: edit the script | 1774 // :script {scriptId}: edit the script |
1775 if (!SCRIPT_ID_VALID(eap->line2)) | 1775 if (eap->addr_count > 0 && !SCRIPT_ID_VALID(eap->line2)) |
1776 emsg(_(e_invalid_argument)); | 1776 emsg(_(e_invalid_argument)); |
1777 else | 1777 else |
1778 { | 1778 { |
1779 eap->arg = SCRIPT_ITEM(eap->line2)->sn_name; | 1779 if (eap->addr_count > 0) |
1780 eap->arg = SCRIPT_ITEM(eap->line2)->sn_name; | |
1781 else | |
1782 { | |
1783 expand_env(eap->arg, NameBuff, MAXPATHL); | |
1784 eap->arg = NameBuff; | |
1785 } | |
1780 do_exedit(eap, NULL); | 1786 do_exedit(eap, NULL); |
1781 } | 1787 } |
1782 return; | 1788 return; |
1783 } | 1789 } |
1784 | 1790 |