diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-12-02 20:46:26 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-12-02 20:46:26 +0000 |
commit | 89469d157aea01513bde826b4519dd6b5fbceae4 (patch) | |
tree | 50c505cfc7722e05f227d04f0ce8f4241b7b0448 /src/charset.c | |
parent | 500c4442834363e02541da564f0b87b82d5783cd (diff) |
patch 9.0.0993: display errors when adding or removing text property typev9.0.0993
Problem: Display errors when adding or removing text property type.
Solution: Perform a full redraw. Only use text properties for which the
type is defined. (closes #11655)
Diffstat (limited to 'src/charset.c')
-rw-r--r-- | src/charset.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/charset.c b/src/charset.c index fe1569c635..7ae15b30d3 100644 --- a/src/charset.c +++ b/src/charset.c @@ -986,11 +986,15 @@ init_chartabsize_arg( mch_memmove(cts->cts_text_props + count, prop_start, count * sizeof(textprop_T)); for (i = 0; i < count; ++i) - if (cts->cts_text_props[i + count].tp_id < 0) + { + textprop_T *tp = cts->cts_text_props + i + count; + if (tp->tp_id < 0 + && text_prop_type_valid(wp->w_buffer, tp)) { cts->cts_has_prop_with_text = TRUE; break; } + } if (!cts->cts_has_prop_with_text) { // won't use the text properties, free them |