Mercurial > vim
comparison src/netbeans.c @ 18422:1848b3e07266 v8.1.2205
patch 8.1.2205: sign entry structure has confusing name
Commit: https://github.com/vim/vim/commit/6656c2ec4cc2163cd0a51d617f429ad7fb46d2d5
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Oct 24 15:00:04 2019 +0200
patch 8.1.2205: sign entry structure has confusing name
Problem: Sign entry structure has confusing name.
Solution: Rename signlist_T to sign_entry_T and prefix se_ to the fields.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 24 Oct 2019 15:15:04 +0200 |
parents | 3f0fd418ac1d |
children | 7982f65d8f54 |
comparison
equal
deleted
inserted
replaced
18421:bf9c90b6a79b | 18422:1848b3e07266 |
---|---|
2975 * change. | 2975 * change. |
2976 */ | 2976 */ |
2977 int | 2977 int |
2978 netbeans_is_guarded(linenr_T top, linenr_T bot) | 2978 netbeans_is_guarded(linenr_T top, linenr_T bot) |
2979 { | 2979 { |
2980 signlist_T *p; | 2980 sign_entry_T *p; |
2981 int lnum; | 2981 int lnum; |
2982 | 2982 |
2983 if (!NETBEANS_OPEN) | 2983 if (!NETBEANS_OPEN) |
2984 return FALSE; | 2984 return FALSE; |
2985 | 2985 |
2986 for (p = curbuf->b_signlist; p != NULL; p = p->next) | 2986 for (p = curbuf->b_signlist; p != NULL; p = p->se_next) |
2987 if (p->id >= GUARDEDOFFSET) | 2987 if (p->se_id >= GUARDEDOFFSET) |
2988 for (lnum = top + 1; lnum < bot; lnum++) | 2988 for (lnum = top + 1; lnum < bot; lnum++) |
2989 if (lnum == p->lnum) | 2989 if (lnum == p->se_lnum) |
2990 return TRUE; | 2990 return TRUE; |
2991 | 2991 |
2992 return FALSE; | 2992 return FALSE; |
2993 } | 2993 } |
2994 | 2994 |
3089 * annotations, cycle through the set of signs. | 3089 * annotations, cycle through the set of signs. |
3090 */ | 3090 */ |
3091 void | 3091 void |
3092 netbeans_gutter_click(linenr_T lnum) | 3092 netbeans_gutter_click(linenr_T lnum) |
3093 { | 3093 { |
3094 signlist_T *p; | 3094 sign_entry_T *p; |
3095 | 3095 |
3096 if (!NETBEANS_OPEN) | 3096 if (!NETBEANS_OPEN) |
3097 return; | 3097 return; |
3098 | 3098 |
3099 for (p = curbuf->b_signlist; p != NULL; p = p->next) | 3099 for (p = curbuf->b_signlist; p != NULL; p = p->se_next) |
3100 { | 3100 { |
3101 if (p->lnum == lnum && p->next && p->next->lnum == lnum) | 3101 if (p->se_lnum == lnum && p->se_next && p->se_next->se_lnum == lnum) |
3102 { | 3102 { |
3103 signlist_T *tail; | 3103 sign_entry_T *tail; |
3104 | 3104 |
3105 /* remove "p" from list, reinsert it at the tail of the sublist */ | 3105 /* remove "p" from list, reinsert it at the tail of the sublist */ |
3106 if (p->prev) | 3106 if (p->se_prev) |
3107 p->prev->next = p->next; | 3107 p->se_prev->se_next = p->se_next; |
3108 else | 3108 else |
3109 curbuf->b_signlist = p->next; | 3109 curbuf->b_signlist = p->se_next; |
3110 p->next->prev = p->prev; | 3110 p->se_next->se_prev = p->se_prev; |
3111 /* now find end of sublist and insert p */ | 3111 /* now find end of sublist and insert p */ |
3112 for (tail = p->next; | 3112 for (tail = p->se_next; |
3113 tail->next && tail->next->lnum == lnum | 3113 tail->se_next && tail->se_next->se_lnum == lnum |
3114 && tail->next->id < GUARDEDOFFSET; | 3114 && tail->se_next->se_id < GUARDEDOFFSET; |
3115 tail = tail->next) | 3115 tail = tail->se_next) |
3116 ; | 3116 ; |
3117 /* tail now points to last entry with same lnum (except | 3117 /* tail now points to last entry with same lnum (except |
3118 * that "guarded" annotations are always last) */ | 3118 * that "guarded" annotations are always last) */ |
3119 p->next = tail->next; | 3119 p->se_next = tail->se_next; |
3120 if (tail->next) | 3120 if (tail->se_next) |
3121 tail->next->prev = p; | 3121 tail->se_next->se_prev = p; |
3122 p->prev = tail; | 3122 p->se_prev = tail; |
3123 tail->next = p; | 3123 tail->se_next = p; |
3124 update_debug_sign(curbuf, lnum); | 3124 update_debug_sign(curbuf, lnum); |
3125 break; | 3125 break; |
3126 } | 3126 } |
3127 } | 3127 } |
3128 } | 3128 } |