diff src/textprop.c @ 16670:5733d8e33bce v8.1.1337

patch 8.1.1337: get empty text prop when splitting line just after text prop commit https://github.com/vim/vim/commit/5c65e6a062dfc7d20931fa1f73d03b1714a4d5e1 Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 17 11:08:56 2019 +0200 patch 8.1.1337: get empty text prop when splitting line just after text prop Problem: Get empty text prop when splitting line just after text prop. Solution: Do not create an empty text prop at the start of the line.
author Bram Moolenaar <Bram@vim.org>
date Fri, 17 May 2019 11:15:06 +0200
parents 1fc9cd08cf3c
children 79c5f723bb5d
line wrap: on
line diff
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -1075,7 +1075,9 @@ adjust_props_for_split(
 	    ++prevprop.ga_len;
 	}
 
-	if (prop.tp_col + prop.tp_len >= skipped && ga_grow(&nextprop, 1) == OK)
+	// Only add the property to the next line if the length is bigger than
+	// zero.
+	if (prop.tp_col + prop.tp_len > skipped && ga_grow(&nextprop, 1) == OK)
 	{
 	    p = ((textprop_T *)nextprop.ga_data) + nextprop.ga_len;
 	    *p = prop;