diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-05-05 21:00:26 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-05-05 21:00:26 +0200 |
commit | 8ffc7c8b5f004971cb6f2bdcfbe4f7123cce717c (patch) | |
tree | 79e1e27de4fa2cdad1960ea5afa0b48950cc9658 /src/quickfix.c | |
parent | 25c9c680ec4dfbb51f4ef21c3460a48d3c67ffc8 (diff) | |
download | vim-git-8ffc7c8b5f004971cb6f2bdcfbe4f7123cce717c.tar.gz |
patch 8.1.1281: cannot specify a count with :chistoryv8.1.1281
Problem: Cannot specify a count with :chistory.
Solution: Add a count to :chistory and :lhistory. (Yegappan Lakshmanan,
closes #4344)
Diffstat (limited to 'src/quickfix.c')
-rw-r--r-- | src/quickfix.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/quickfix.c b/src/quickfix.c index b4497ae75..61576505a 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -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 |