Mercurial > vim
diff src/textprop.c @ 30306:43d942ff32ce v9.0.0489
patch 9.0.0489: using "end_lnum" with virtual text causes problems
Commit: https://github.com/vim/vim/commit/fb593c5350e8fe23b608ded5a011cd7eefe73922
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 17 18:57:36 2022 +0100
patch 9.0.0489: using "end_lnum" with virtual text causes problems
Problem: Using "end_lnum" with virtual text causes problems.
Solution: Disallow using "end_lnum" with virtual text. (closes https://github.com/vim/vim/issues/11151)
Also disallow "end_col" and "length".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 17 Sep 2022 20:00:03 +0200 |
parents | 6b658ef69e93 |
children | c02b74b87608 |
line wrap: on
line diff
--- a/src/textprop.c +++ b/src/textprop.c @@ -488,6 +488,14 @@ prop_add_common( if (dict_has_key(dict, "text")) { + if (dict_has_key(dict, "length") + || dict_has_key(dict, "end_col") + || dict_has_key(dict, "end_lnum")) + { + emsg(_(e_cannot_use_length_endcol_and_endlnum_with_text)); + goto theend; + } + text = dict_get_string(dict, "text", TRUE); if (text == NULL) goto theend;