mirror of
https://github.com/neovim/neovim.git
synced 2026-04-21 14:55:33 +00:00
Allow multiple signs of same type in one line (matching vim behaviour)
This partly rolls back 36762a00a8,
but it matches vim behaviour (covered with recent tests - oldtest).
This commit is contained in:
@@ -339,19 +339,6 @@ void buf_addsign(
|
||||
}
|
||||
|
||||
insert_sign_by_lnum_prio(buf, prev, id, groupname, prio, lnum, typenr);
|
||||
|
||||
// Having more than one sign with _the same type_ and on the _same line_ is
|
||||
// unwanted, let's prevent it.
|
||||
|
||||
lastp = &buf->b_signlist;
|
||||
for (sign = buf->b_signlist; sign != NULL; sign = sign->next) {
|
||||
if (lnum == sign->lnum && sign->typenr == typenr && id != sign->id) {
|
||||
*lastp = sign->next;
|
||||
xfree(sign);
|
||||
} else {
|
||||
lastp = &sign->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// For an existing, placed sign "markId" change the type to "typenr".
|
||||
|
||||
Reference in New Issue
Block a user