aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-11-14 00:02:29 -0800
committerGitHub <noreply@github.com>2019-11-14 00:02:29 -0800
commite3b08a0fc43eef91b51f8166a036e86b5bdf5613 (patch)
treeaab224f640e8986e377c6d5a7615077f6b8d3f7d /src/nvim/quickfix.c
parent570ee5f404966a6ffd9a5241d91adc6a9f5f2c9d (diff)
parenta0c18bf2017ac7d38d13014a810bda44d09dfcbb (diff)
downloadrneovim-e3b08a0fc43eef91b51f8166a036e86b5bdf5613.tar.gz
rneovim-e3b08a0fc43eef91b51f8166a036e86b5bdf5613.tar.bz2
rneovim-e3b08a0fc43eef91b51f8166a036e86b5bdf5613.zip
Merge #11384 from janlazo/vim-8.1.2293
vim-patch:8.1.{927,2293}
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r--src/nvim/quickfix.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index 276427f216..ed57b28029 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -4559,9 +4559,9 @@ static qfline_T *qf_find_closest_entry(qf_list_T *qfl,
/// Get the nth quickfix entry below the specified entry treating multiple
/// entries on a single line as one. Searches forward in the list.
-static qfline_T *qf_get_nth_below_entry(qfline_T *entry,
- int *errornr,
- linenr_T n)
+static void qf_get_nth_below_entry(qfline_T *entry,
+ int *errornr,
+ linenr_T n)
{
while (n-- > 0 && !got_int) {
qfline_T *first_entry = entry;
@@ -4582,15 +4582,13 @@ static qfline_T *qf_get_nth_below_entry(qfline_T *entry,
entry = entry->qf_next;
(*errornr)++;
}
-
- return entry;
}
/// Get the nth quickfix entry above the specified entry treating multiple
/// entries on a single line as one. Searches backwards in the list.
-static qfline_T *qf_get_nth_above_entry(qfline_T *entry,
- int *errornr,
- linenr_T n)
+static void qf_get_nth_above_entry(qfline_T *entry,
+ int *errornr,
+ linenr_T n)
{
while (n-- > 0 && !got_int) {
if (entry->qf_prev == NULL
@@ -4604,8 +4602,6 @@ static qfline_T *qf_get_nth_above_entry(qfline_T *entry,
// If multiple entries are on the same line, then use the first entry
entry = qf_find_first_entry_on_line(entry, errornr);
}
-
- return entry;
}
/// Find the n'th quickfix entry adjacent to line 'lnum' in buffer 'bnr' in the
@@ -4629,9 +4625,9 @@ static int qf_find_nth_adj_entry(qf_list_T *qfl,
if (--n > 0) {
// Go to the n'th entry in the current buffer
if (dir == FORWARD) {
- adj_entry = qf_get_nth_below_entry(adj_entry, &errornr, n);
+ qf_get_nth_below_entry(adj_entry, &errornr, n);
} else {
- adj_entry = qf_get_nth_above_entry(adj_entry, &errornr, n);
+ qf_get_nth_above_entry(adj_entry, &errornr, n);
}
}