changeset 18442:4fd68dcf6d88 v8.1.2215

patch 8.1.2215: unreachable code in adjusting text prop columns Commit: https://github.com/vim/vim/commit/7aee6876eb4a66cc9d475e30bb58c060e7d4e90e Author: Bram Moolenaar <Bram@vim.org> Date: Fri Oct 25 21:49:38 2019 +0200 patch 8.1.2215: unreachable code in adjusting text prop columns Problem: Unreachable code in adjusting text prop columns. Solution: Remove the code. (Christian Brabandt)
author Bram Moolenaar <Bram@vim.org>
date Fri, 25 Oct 2019 22:00:04 +0200
parents 176f51ad4211
children 21f48049529e
files src/textprop.c src/version.c
diffstat 2 files changed, 3 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -1067,13 +1067,7 @@ adjust_prop_columns(
 	if (bytes_added > 0
 		&& (tmp_prop.tp_col >= col + (start_incl ? 2 : 1)))
 	{
-	    if (tmp_prop.tp_col < col + (start_incl ? 2 : 1))
-	    {
-		tmp_prop.tp_len += (tmp_prop.tp_col - 1 - col) + bytes_added;
-		tmp_prop.tp_col = col + 1;
-	    }
-	    else
-		tmp_prop.tp_col += bytes_added;
+	    tmp_prop.tp_col += bytes_added;
 	    // Save for undo if requested and not done yet.
 	    if ((flags & APC_SAVE_FOR_UNDO) && !dirty)
 		u_savesub(lnum);
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2215,
+/**/
     2214,
 /**/
     2213,