changeset 22290:9debc021e99e v8.2.1694

patch 8.2.1694: compiler warning for loss if data Commit: https://github.com/vim/vim/commit/573545a55afb5d42614cdb69f356abb32409270b Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 16 15:46:08 2020 +0200 patch 8.2.1694: compiler warning for loss if data Problem: Compiler warning for loss if data. Solution: Add typecast.
author Bram Moolenaar <Bram@vim.org>
date Wed, 16 Sep 2020 16:00:04 +0200
parents 16d0d731599b
children 9a335daeb41d
files src/ops.c src/version.c
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1694,
+/**/
     1693,
 /**/
     1692,