diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-09-20 21:04:35 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-09-20 21:04:35 +0200 |
commit | 8902b31f1b31c117915defc23ac45cdc1f5c671b (patch) | |
tree | e2c7dd046e68cd28bbf8a7b5959069be7294161d /src/textprop.c | |
parent | 7795bfea6d30c85f2c05d986a0cfe4019df4d74d (diff) | |
download | vim-git-8902b31f1b31c117915defc23ac45cdc1f5c671b.tar.gz |
patch 8.2.1714: text properties corrupted with substitute commandv8.2.1714
Problem: Text properties corrupted with substitute command. (Filipe
Brandenburger)
Solution: Get the changed line again after using u_savesub(). (closes #6984)
Diffstat (limited to 'src/textprop.c')
-rw-r--r-- | src/textprop.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/textprop.c b/src/textprop.c index 639c5df8a..bca0d9e02 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -1349,6 +1349,10 @@ adjust_prop_columns( && u_savesub(lnum) == FAIL) return FALSE; dirty = TRUE; + + // u_savesub() may have updated curbuf->b_ml, fetch it again + if (curbuf->b_ml.ml_line_lnum != lnum) + proplen = get_text_props(curbuf, lnum, &props, TRUE); } if (res.can_drop) continue; // Drop this text property |