mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 06:58:35 +00:00
signs: fix crash in buf_addsign #10091
buf_signcols sorting breaks signlist structure. Remove sorting in buf_signcols, because signlist is already kept sorted and it did not correctly update the double linked list. Fixes #10078
This commit is contained in:

committed by
Justin M. Keyes

parent
ef33500e17
commit
95ece7d046
@@ -231,9 +231,11 @@ static void insert_sign_by_lnum_prio(
|
||||
{
|
||||
signlist_T *sign;
|
||||
|
||||
// keep signs sorted by lnum and by priority: insert new sign at
|
||||
// keep signs sorted by lnum, priority and id: insert new sign at
|
||||
// the proper position in the list for this lnum.
|
||||
while (prev != NULL && prev->lnum == lnum && prev->priority <= prio) {
|
||||
while (prev != NULL && prev->lnum == lnum
|
||||
&& (prev->priority < prio
|
||||
|| (prev->priority == prio && prev->id <= id))) {
|
||||
prev = prev->prev;
|
||||
}
|
||||
if (prev == NULL) {
|
||||
|
Reference in New Issue
Block a user