Mercurial > vim
comparison src/netbeans.c @ 19888:435726a03481 v8.2.0500
patch 8.2.0500: using the same loop in many places
Commit: https://github.com/vim/vim/commit/aeea72151c31d686bcbb7b06d895006d7363585c
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Apr 2 18:50:46 2020 +0200
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 https://github.com/vim/vim/issues/5339)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 02 Apr 2020 19:00:05 +0200 |
parents | 7982f65d8f54 |
children | aadd1cae2ff5 |
comparison
equal
deleted
inserted
replaced
19887:d03edd8c7e2f | 19888:435726a03481 |
---|---|
2980 int lnum; | 2980 int lnum; |
2981 | 2981 |
2982 if (!NETBEANS_OPEN) | 2982 if (!NETBEANS_OPEN) |
2983 return FALSE; | 2983 return FALSE; |
2984 | 2984 |
2985 for (p = curbuf->b_signlist; p != NULL; p = p->se_next) | 2985 FOR_ALL_SIGNS_IN_BUF(curbuf, p) |
2986 if (p->se_id >= GUARDEDOFFSET) | 2986 if (p->se_id >= GUARDEDOFFSET) |
2987 for (lnum = top + 1; lnum < bot; lnum++) | 2987 for (lnum = top + 1; lnum < bot; lnum++) |
2988 if (lnum == p->se_lnum) | 2988 if (lnum == p->se_lnum) |
2989 return TRUE; | 2989 return TRUE; |
2990 | 2990 |
3093 sign_entry_T *p; | 3093 sign_entry_T *p; |
3094 | 3094 |
3095 if (!NETBEANS_OPEN) | 3095 if (!NETBEANS_OPEN) |
3096 return; | 3096 return; |
3097 | 3097 |
3098 for (p = curbuf->b_signlist; p != NULL; p = p->se_next) | 3098 FOR_ALL_SIGNS_IN_BUF(curbuf, p) |
3099 { | 3099 { |
3100 if (p->se_lnum == lnum && p->se_next && p->se_next->se_lnum == lnum) | 3100 if (p->se_lnum == lnum && p->se_next && p->se_next->se_lnum == lnum) |
3101 { | 3101 { |
3102 sign_entry_T *tail; | 3102 sign_entry_T *tail; |
3103 | 3103 |