vim-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 vim/vim#4344)
8ffc7c8b5f
This commit is contained in:
Jan Edmund Lazo
2021-01-01 04:47:35 -05:00
parent d1608f7503
commit d7b577d6ab
4 changed files with 43 additions and 6 deletions

View File

@@ -3300,6 +3300,24 @@ void 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 = (int)(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 {