Mercurial > vim
comparison src/quickfix.c @ 16978:15bc5a64bd50 v8.1.1489
patch 8.1.1489: sign order wrong when priority was changed
commit https://github.com/vim/vim/commit/64416127fc184b5544530afe818722679158f059
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jun 7 21:37:13 2019 +0200
patch 8.1.1489: sign order wrong when priority was changed
Problem: Sign order wrong when priority was changed.
Solution: Reorder signs when priority is changed. (Yegappan Lakshmanan,
closes #4502)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 07 Jun 2019 21:45:05 +0200 |
parents | ce04ebdf26b8 |
children | 10e0d7d96cb0 |
comparison
equal
deleted
inserted
replaced
16977:9d3ff8fd2018 | 16978:15bc5a64bd50 |
---|---|
5318 /* | 5318 /* |
5319 * Get the nth quickfix entry below the specified entry. Searches forward in | 5319 * Get the nth quickfix entry below the specified entry. Searches forward in |
5320 * the list. If linewise is TRUE, then treat multiple entries on a single line | 5320 * the list. If linewise is TRUE, then treat multiple entries on a single line |
5321 * as one. | 5321 * as one. |
5322 */ | 5322 */ |
5323 static qfline_T * | 5323 static void |
5324 qf_get_nth_below_entry(qfline_T *entry, int n, int linewise, int *errornr) | 5324 qf_get_nth_below_entry(qfline_T *entry, int n, int linewise, int *errornr) |
5325 { | 5325 { |
5326 while (n-- > 0 && !got_int) | 5326 while (n-- > 0 && !got_int) |
5327 { | 5327 { |
5328 qfline_T *first_entry = entry; | 5328 qfline_T *first_entry = entry; |
5346 } | 5346 } |
5347 | 5347 |
5348 entry = entry->qf_next; | 5348 entry = entry->qf_next; |
5349 ++*errornr; | 5349 ++*errornr; |
5350 } | 5350 } |
5351 | |
5352 return entry; | |
5353 } | 5351 } |
5354 | 5352 |
5355 /* | 5353 /* |
5356 * Get the nth quickfix entry above the specified entry. Searches backwards in | 5354 * Get the nth quickfix entry above the specified entry. Searches backwards in |
5357 * the list. If linewise is TRUE, then treat multiple entries on a single line | 5355 * the list. If linewise is TRUE, then treat multiple entries on a single line |
5358 * as one. | 5356 * as one. |
5359 */ | 5357 */ |
5360 static qfline_T * | 5358 static void |
5361 qf_get_nth_above_entry(qfline_T *entry, int n, int linewise, int *errornr) | 5359 qf_get_nth_above_entry(qfline_T *entry, int n, int linewise, int *errornr) |
5362 { | 5360 { |
5363 while (n-- > 0 && !got_int) | 5361 while (n-- > 0 && !got_int) |
5364 { | 5362 { |
5365 if (entry->qf_prev == NULL | 5363 if (entry->qf_prev == NULL |
5371 | 5369 |
5372 // If multiple entries are on the same line, then use the first entry | 5370 // If multiple entries are on the same line, then use the first entry |
5373 if (linewise) | 5371 if (linewise) |
5374 entry = qf_find_first_entry_on_line(entry, errornr); | 5372 entry = qf_find_first_entry_on_line(entry, errornr); |
5375 } | 5373 } |
5376 | |
5377 return entry; | |
5378 } | 5374 } |
5379 | 5375 |
5380 /* | 5376 /* |
5381 * Find the n'th quickfix entry adjacent to position 'pos' in buffer 'bnr' in | 5377 * Find the n'th quickfix entry adjacent to position 'pos' in buffer 'bnr' in |
5382 * the specified direction. Returns the error number in the quickfix list or 0 | 5378 * the specified direction. Returns the error number in the quickfix list or 0 |
5401 | 5397 |
5402 if (--n > 0) | 5398 if (--n > 0) |
5403 { | 5399 { |
5404 // Go to the n'th entry in the current buffer | 5400 // Go to the n'th entry in the current buffer |
5405 if (dir == FORWARD) | 5401 if (dir == FORWARD) |
5406 adj_entry = qf_get_nth_below_entry(adj_entry, n, linewise, | 5402 qf_get_nth_below_entry(adj_entry, n, linewise, &errornr); |
5407 &errornr); | |
5408 else | 5403 else |
5409 adj_entry = qf_get_nth_above_entry(adj_entry, n, linewise, | 5404 qf_get_nth_above_entry(adj_entry, n, linewise, &errornr); |
5410 &errornr); | |
5411 } | 5405 } |
5412 | 5406 |
5413 return errornr; | 5407 return errornr; |
5414 } | 5408 } |
5415 | 5409 |