]> granicus.if.org Git - vim/commitdiff
patch 8.1.2215: unreachable code in adjusting text prop columns v8.1.2215
authorBram Moolenaar <Bram@vim.org>
Fri, 25 Oct 2019 19:49:38 +0000 (21:49 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 25 Oct 2019 19:49:38 +0000 (21:49 +0200)
Problem:    Unreachable code in adjusting text prop columns.
Solution:   Remove the code. (Christian Brabandt)

src/textprop.c
src/version.c

index cc95546e2587485c76d584c862a41264dd7a8951..7029daaae288d5c6e47c23fed207ef3fcbff8ce3 100644 (file)
@@ -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);
index 77ce139f87317f05a6224f89f86d248214d3e975..b30faa75693af64dc73ec62c46f87118bd1dde96 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2215,
 /**/
     2214,
 /**/