]> granicus.if.org Git - vim/commitdiff
patch 8.2.1694: compiler warning for loss if data v8.2.1694
authorBram Moolenaar <Bram@vim.org>
Wed, 16 Sep 2020 13:46:08 +0000 (15:46 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 16 Sep 2020 13:46:08 +0000 (15:46 +0200)
Problem:    Compiler warning for loss if data.
Solution:   Add typecast.

src/ops.c
src/version.c

index d5729403464999e9ba47bca02b468f410b02bf34..99388a60b8519b829a42beecde4c3444d20ae144 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -2840,7 +2840,8 @@ do_addsub(
            // Delete the one character before the insert.
            curwin->w_cursor = save_pos;
            (void)del_char(FALSE);
-           curwin->w_cursor.col = STRLEN(ml_get_curline()) - bytes_after;
+           curwin->w_cursor.col = (colnr_T)(STRLEN(ml_get_curline())
+                                                               - bytes_after);
            --todel;
        }
        while (todel-- > 0)
index dab2bd8e27fba07d2eb40c41accef29c30453092..c3efafd0bbd3bbfbf3dc943825b8b5b859906b22 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1694,
 /**/
     1693,
 /**/