0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.1.1281: cannot specify a count with :chistory

Problem:    Cannot specify a count with :chistory.
Solution:   Add a count to :chistory and :lhistory. (Yegappan Lakshmanan,
            closes #4344)
This commit is contained in:
Bram Moolenaar
2019-05-05 21:00:26 +02:00
parent 25c9c680ec
commit 8ffc7c8b5f
5 changed files with 75 additions and 26 deletions

View File

@@ -3742,6 +3742,27 @@ qf_history(exarg_T *eap)
qf_info_T *qi = qf_cmd_get_stack(eap, FALSE);
int i;
if (eap->addr_count > 0)
{
if (qi == NULL)
{
emsg(_(e_loclist));
return;
}
// Jump to the specified quickfix list
if (eap->line2 > 0 && eap->line2 <= qi->qf_listcount)
{
qi->qf_curlist = eap->line2 - 1;
qf_msg(qi, qi->qf_curlist, "");
qf_update_buffer(qi, NULL);
}
else
emsg(_(e_invrange));
return;
}
if (qf_stack_empty(qi))
msg(_("No entries"));
else