aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-01-01 04:47:35 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-01-01 04:58:05 -0500
commitd7b577d6ab38da8f199a616707a666c43e252ce3 (patch)
tree1b1b17d7d365223453471bc1b72a1b23dc679e60 /src/nvim/quickfix.c
parentd1608f7503512b37650522cf5c8a3dce7add5e3b (diff)
downloadrneovim-d7b577d6ab38da8f199a616707a666c43e252ce3.tar.gz
rneovim-d7b577d6ab38da8f199a616707a666c43e252ce3.tar.bz2
rneovim-d7b577d6ab38da8f199a616707a666c43e252ce3.zip
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) https://github.com/vim/vim/commit/8ffc7c8b5f004971cb6f2bdcfbe4f7123cce717c
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r--src/nvim/quickfix.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index eaa0117d93..d083d2890c 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -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 {