changeset 14744:1ae9c8a1b3bf v8.1.0384

patch 8.1.0384: sign ordering depends on +netbeans feature commit https://github.com/vim/vim/commit/8aeb504fc68e3fea9da5567d2d9a31a132fbf90f Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 13 18:33:05 2018 +0200 patch 8.1.0384: sign ordering depends on +netbeans feature Problem: Sign ordering depends on +netbeans feature. Solution: Also order signs without +netbeans. (Christian Brabandt, closes #3224)
author Christian Brabandt <cb@256bit.org>
date Thu, 13 Sep 2018 18:45:06 +0200
parents d3d20dd1de5b
children 633af239ab81
files src/buffer.c src/structs.h src/version.c
diffstat 3 files changed, 13 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5856,11 +5856,9 @@ insert_sign(
 	newsign->lnum = lnum;
 	newsign->typenr = typenr;
 	newsign->next = next;
-#ifdef FEAT_NETBEANS_INTG
 	newsign->prev = prev;
 	if (next != NULL)
 	    next->prev = newsign;
-#endif
 
 	if (prev == NULL)
 	{
@@ -5905,38 +5903,29 @@ buf_addsign(
 	    sign->typenr = typenr;
 	    return;
 	}
-	else if (
-#ifndef FEAT_NETBEANS_INTG  /* keep signs sorted by lnum */
-		   id < 0 &&
-#endif
-			     lnum < sign->lnum)
+	else if (lnum < sign->lnum)
 	{
-#ifdef FEAT_NETBEANS_INTG /* insert new sign at head of list for this lnum */
-	    /* XXX - GRP: Is this because of sign slide problem? Or is it
-	     * really needed? Or is it because we allow multiple signs per
-	     * line? If so, should I add that feature to FEAT_SIGNS?
-	     */
+	    // keep signs sorted by lnum: insert new sign at head of list for
+	    // this lnum
 	    while (prev != NULL && prev->lnum == lnum)
 		prev = prev->prev;
 	    if (prev == NULL)
 		sign = buf->b_signlist;
 	    else
 		sign = prev->next;
-#endif
 	    insert_sign(buf, prev, sign, id, lnum, typenr);
 	    return;
 	}
 	prev = sign;
     }
-#ifdef FEAT_NETBEANS_INTG /* insert new sign at head of list for this lnum */
-    /* XXX - GRP: See previous comment */
+
+    // insert new sign at head of list for this lnum
     while (prev != NULL && prev->lnum == lnum)
 	prev = prev->prev;
     if (prev == NULL)
 	sign = buf->b_signlist;
     else
 	sign = prev->next;
-#endif
     insert_sign(buf, prev, sign, id, lnum, typenr);
 
     return;
@@ -6008,10 +5997,8 @@ buf_delsign(
 	if (sign->id == id)
 	{
 	    *lastp = next;
-#ifdef FEAT_NETBEANS_INTG
 	    if (next != NULL)
 		next->prev = sign->prev;
-#endif
 	    lnum = sign->lnum;
 	    vim_free(sign);
 	    break;
@@ -6067,7 +6054,9 @@ buf_findsign_id(
 
 
 # if defined(FEAT_NETBEANS_INTG) || defined(PROTO)
-/* see if a given type of sign exists on a specific line */
+/*
+ * See if a given type of sign exists on a specific line.
+ */
     int
 buf_findsigntype_id(
     buf_T	*buf,		/* buffer whose sign we are searching for */
@@ -6085,7 +6074,9 @@ buf_findsigntype_id(
 
 
 #  if defined(FEAT_SIGN_ICONS) || defined(PROTO)
-/* return the number of icons on the given line */
+/*
+ * Return the number of icons on the given line.
+ */
     int
 buf_signcount(buf_T *buf, linenr_T lnum)
 {
--- a/src/structs.h
+++ b/src/structs.h
@@ -704,9 +704,7 @@ struct signlist
     linenr_T	lnum;		/* line number which has this sign */
     int		typenr;		/* typenr of sign */
     signlist_T	*next;		/* next signlist entry */
-# ifdef FEAT_NETBEANS_INTG
     signlist_T  *prev;		/* previous entry -- for easy reordering */
-# endif
 };
 
 /* type argument for buf_getsigntype() */
--- a/src/version.c
+++ b/src/version.c
@@ -795,6 +795,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    384,
+/**/
     383,
 /**/
     382,