patch 8.2.0500: using the same loop in many places
Problem: Using the same loop in many places.
Solution: Define more FOR_ALL macros. (Yegappan Lakshmanan, closes #5339)
diff --git a/src/netbeans.c b/src/netbeans.c
index f55f388..4d79a2e 100644
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -2982,7 +2982,7 @@
if (!NETBEANS_OPEN)
return FALSE;
- for (p = curbuf->b_signlist; p != NULL; p = p->se_next)
+ FOR_ALL_SIGNS_IN_BUF(curbuf, p)
if (p->se_id >= GUARDEDOFFSET)
for (lnum = top + 1; lnum < bot; lnum++)
if (lnum == p->se_lnum)
@@ -3095,7 +3095,7 @@
if (!NETBEANS_OPEN)
return;
- for (p = curbuf->b_signlist; p != NULL; p = p->se_next)
+ FOR_ALL_SIGNS_IN_BUF(curbuf, p)
{
if (p->se_lnum == lnum && p->se_next && p->se_next->se_lnum == lnum)
{