#endif
EXTERN char e_completeopt_escape_cannot_be_used_with_nargs_underscore[]
INIT(= N_("E1579: -completeopt=escape cannot be used with -nargs=_"));
+#ifdef FEAT_PROP_POPUP
+EXTERN char e_too_many_text_properties_on_a_single_line[]
+ INIT(= N_("E1580: Too many text properties on a single line"));
+#endif
msgstr ""
"Project-Id-Version: Vim\n"
"Report-Msgid-Bugs-To: vim-dev@vim.org\n"
-"POT-Creation-Date: 2026-06-27 08:41+0000\n"
+"POT-Creation-Date: 2026-07-23 20:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "E1579: -completeopt=escape cannot be used with -nargs=_"
msgstr ""
+msgid "E1580: Too many text properties on a single line"
+msgstr ""
+
#. type of cmdline window or 0
#. result of cmdline window or 0
#. buffer of cmdline window or NULL
set ff&
endfunc
+" Adding more than 65535 text properties to one line must be rejected instead
+" of wrapping the uint16_t property count and overflowing the allocation.
+func Test_prop_add_over_uint16_max()
+ CheckNotAsan
+ CheckNotValgrind
+ new
+ call setline(1, 'x')
+ call prop_type_add('overflow', {})
+ for _ in range(0xffff)
+ call prop_add(1, 1, {'type': 'overflow', 'length': 0})
+ endfor
+ call assert_equal(0xffff, prop_list(1)->len())
+ call assert_fails("call prop_add(1, 1, {'type': 'overflow', 'length': 0})", 'E1580:')
+ call assert_equal(0xffff, prop_list(1)->len())
+ call prop_type_delete('overflow')
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
proplen = get_text_props(buf, lnum, &props, TRUE);
textlen = ml_get_buf_len(buf, lnum) + 1;
+ // prop_count is a uint16_t; stop before proplen + 1 wraps to zero.
+ if (proplen >= 0xffff)
+ {
+ emsg(_(e_too_many_text_properties_on_a_single_line));
+ goto theend;
+ }
+
if (lnum == start_lnum)
col = start_col;
else
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 841,
/**/
840,
/**/