Patch 8.2.3257
Problem: Calling prop_find() with -1 for ID gives errornous error. (Naohiro
Ono)
Solution: When passing -1 use -2. (closes #8674)
Files: src/textprop.c, src/testdir/test_textprop.vim
*** ../vim-8.2.3256/src/textprop.c 2021-07-28 13:30:12.212929910 +0200
--- src/textprop.c 2021-07-31 18:32:31.413153828 +0200
***************
*** 686,692 ****
--- 686,696 ----
skipstart = dict_get_bool(dict, (char_u *)"skipstart", 0);
if (dict_find(dict, (char_u *)"id", -1) != NULL)
+ {
id = dict_get_number(dict, (char_u *)"id");
+ if (id == -1)
+ id = -2;
+ }
if (dict_find(dict, (char_u *)"type", -1))
{
char_u *name = dict_get_string(dict, (char_u *)"type", FALSE);
*** ../vim-8.2.3256/src/testdir/test_textprop.vim 2021-07-28
13:30:12.212929910 +0200
--- src/testdir/test_textprop.vim 2021-07-31 18:32:01.801327438 +0200
***************
*** 239,244 ****
--- 239,247 ----
let result = prop_find({'type': 'prop_name', 'lnum': 1}, 'f')
call assert_equal(expected[0], result)
+ " When ID is -1 it's like prop is not found.
+ call assert_equal({}, prop_find({'id': -1}))
+
call prop_clear(1,6)
call prop_type_delete('prop_name')
*** ../vim-8.2.3256/src/version.c 2021-07-31 17:20:00.620832958 +0200
--- src/version.c 2021-07-31 18:33:03.612970402 +0200
***************
*** 757,758 ****
--- 757,760 ----
{ /* Add new patch number below this line */
+ /**/
+ 3257,
/**/
--
GALAHAD turns back. We see from his POV the lovely ZOOT standing by him
smiling enchantingly and a number of equally delectable GIRLIES draped
around in the seductively poulticed room. They look at him smilingly and
wave.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202107311634.16VGYRF3027335%40masaka.moolenaar.net.