diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-05-17 11:08:56 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-05-17 11:08:56 +0200 |
commit | 5c65e6a062dfc7d20931fa1f73d03b1714a4d5e1 (patch) | |
tree | aa2fb3f679bb6c2837b0c640f43ee721c78358c8 /src/textprop.c | |
parent | 17aca707f92235b6f962e637e8073162d18e6de2 (diff) | |
download | vim-git-5c65e6a062dfc7d20931fa1f73d03b1714a4d5e1.tar.gz |
patch 8.1.1337: get empty text prop when splitting line just after text propv8.1.1337
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.
Diffstat (limited to 'src/textprop.c')
-rw-r--r-- | src/textprop.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/textprop.c b/src/textprop.c index 8c1e46ca6..361ecb126 100644 --- 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; |