Hi, Thanks for the comments. See below.
On Fri, Aug 13, 2021 at 12:37 AM Dominique Pellé <[email protected]> wrote: > *@dpelle* commented on this pull request. > ------------------------------ > > In src/textprop.c > <https://github.com/vim/vim/pull/8751#discussion_r688304652>: > > > + linenr_T start_lnum, > + colnr_T start_col, > + dict_T *dict, > + buf_T *default_buf, > + typval_T *dict_arg) > +{ > + linenr_T end_lnum; > + colnr_T end_col; > + char_u *type_name; > + buf_T *buf = default_buf; > + int id = 0; > + > + if (dict == NULL || dict_find(dict, (char_u *)"type", -1) == NULL) > + { > + emsg(_("E965: missing property type name")); > + return; > > Indentation is wrong here. It's also wrong in several other lines below > (e.g. line 389) > I checked the indentation in the file and it looks correct to me. > ------------------------------ > > In src/testdir/test_textprop.vim > <https://github.com/vim/vim/pull/8751#discussion_r688307163>: > > > @@ -339,6 +339,33 @@ func Test_prop_add() > bwipe! > endfunc > > +" Test for the prop_add_list() function > +func Test_prop_add_list() > + new > + call AddPropTypes() > + call setline(1, ['one one one', 'two two two', 'six six six']) > + call prop_add_list(#{type: 'one', id: 2}, [[1, 1, 3], [2, 5, 7], [3, 9, > 11]]) > + call assert_equal([#{id: 2, col: 1, type_bufnr: 0, end: 1, type: 'one', > + \ length: 2, start: 1}], prop_list(1)) > + call assert_equal([#{id: 2, col: 5, type_bufnr: 0, end: 1, type: 'one', > + \ length: 2, start: 1}], prop_list(2)) > + call assert_equal([#{id: 2, col: 9, type_bufnr: 0, end: 1, type: 'one', > + \ length: 2, start: 1}], prop_list(3)) > + call assert_fails('call prop_add_list([1, 2], [[1, 1, 3]])', 'E1206:') > + call assert_fails('call prop_add_list({}, {})', 'E1211:') > > Also test with: > > - test_null_list()? > > I have added a new test for this. > > - a list that contains something else that a lists e.g. [1, 'a'] > > > There is already a test for using a List with non-number items a few lines below. Regards, Yegappan -- -- 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/CAAW7x7nqARBV048skrUkDJ1DtZDPbF%2BcHSFcL9U0OAaNXUR9ng%40mail.gmail.com.
