comparison src/quickfix.c @ 16555:1302bc0b80db v8.1.1281

patch 8.1.1281: cannot specify a count with :chistory commit https://github.com/vim/vim/commit/8ffc7c8b5f004971cb6f2bdcfbe4f7123cce717c Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 5 21:00:26 2019 +0200 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)
author Bram Moolenaar <Bram@vim.org>
date Sun, 05 May 2019 21:15:05 +0200
parents 1d2b3bb35414
children 8f0ea605ec96
comparison
equal deleted inserted replaced
16554:46b6265c641e 16555:1302bc0b80db
3740 qf_history(exarg_T *eap) 3740 qf_history(exarg_T *eap)
3741 { 3741 {
3742 qf_info_T *qi = qf_cmd_get_stack(eap, FALSE); 3742 qf_info_T *qi = qf_cmd_get_stack(eap, FALSE);
3743 int i; 3743 int i;
3744 3744
3745 if (eap->addr_count > 0)
3746 {
3747 if (qi == NULL)
3748 {
3749 emsg(_(e_loclist));
3750 return;
3751 }
3752
3753 // Jump to the specified quickfix list
3754 if (eap->line2 > 0 && eap->line2 <= qi->qf_listcount)
3755 {
3756 qi->qf_curlist = eap->line2 - 1;
3757 qf_msg(qi, qi->qf_curlist, "");
3758 qf_update_buffer(qi, NULL);
3759 }
3760 else
3761 emsg(_(e_invrange));
3762
3763 return;
3764 }
3765
3745 if (qf_stack_empty(qi)) 3766 if (qf_stack_empty(qi))
3746 msg(_("No entries")); 3767 msg(_("No entries"));
3747 else 3768 else
3748 for (i = 0; i < qi->qf_listcount; ++i) 3769 for (i = 0; i < qi->qf_listcount; ++i)
3749 qf_msg(qi, i, i == qi->qf_curlist ? "> " : " "); 3770 qf_msg(qi, i, i == qi->qf_curlist ? "> " : " ");