0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

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)
This commit is contained in:
Bram Moolenaar
2020-04-02 18:50:46 +02:00
parent f10806b250
commit aeea72151c
34 changed files with 176 additions and 141 deletions

View File

@@ -2982,7 +2982,7 @@ netbeans_is_guarded(linenr_T top, linenr_T bot)
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 @@ netbeans_gutter_click(linenr_T lnum)
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)
{