Closes #8675.
https://github.com/vim/vim/pull/8751
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.![]()
@yegappan pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
View it on GitHub or unsubscribe.
Merging #8751 (bb04068) into master (92f05f2) will decrease coverage by
87.68%.
The diff coverage is0.00%.
❗ Current head bb04068 differs from pull request most recent head 5de649d. Consider uploading reports for the commit 5de649d to get more accurate results
@@ Coverage Diff @@ ## master #8751 +/- ## =========================================== - Coverage 90.14% 2.46% -87.69% =========================================== Files 151 149 -2 Lines 170590 165370 -5220 =========================================== - Hits 153780 4072 -149708 - Misses 16810 161298 +144488
| Flag | Coverage Δ | |
|---|---|---|
| huge-clang-none | ? |
|
| huge-gcc-none | ? |
|
| huge-gcc-testgui | ? |
|
| huge-gcc-unittests | 2.46% <0.00%> (-0.01%) |
⬇️ |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/evalfunc.c | 0.00% <ø> (-96.38%) |
⬇️ |
| src/textprop.c | 0.00% <0.00%> (-96.82%) |
⬇️ |
| src/float.c | 0.00% <0.00%> (-99.22%) |
⬇️ |
| src/gui_gtk_f.c | 0.00% <0.00%> (-97.54%) |
⬇️ |
| src/sound.c | 0.00% <0.00%> (-97.12%) |
⬇️ |
| src/crypt_zip.c | 0.00% <0.00%> (-97.06%) |
⬇️ |
| src/match.c | 0.00% <0.00%> (-96.98%) |
⬇️ |
| src/sha256.c | 0.00% <0.00%> (-96.94%) |
⬇️ |
| src/evalbuffer.c | 0.00% <0.00%> (-96.92%) |
⬇️ |
| src/cmdhist.c | 0.00% <0.00%> (-96.76%) |
⬇️ |
| ... and 139 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered by Codecov. Last update 92f05f2...5de649d. Read the comment docs.
Closes #8675.
You can view, comment on, or merge this pull request online at:
https://github.com/vim/vim/pull/8751
Commit Summary
- Add support for prop_add_list()
@yegappan pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
View it on GitHub or unsubscribe.
@dpelle commented on this pull request.
In src/textprop.c:
> + 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)
In src/testdir/test_textprop.vim:
> @@ -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()?[1, 'a']—
You are receiving this because you commented.
I find it awkward that multiline text-properties cannot be handled with this function. Is there really such a drastic slowdown when the function is changed to prop_add_list({props}, [[{lnum}, {col}, {end-lnum}, {end-col}], ...])?
—
You are receiving this because you commented.
@dpelle commented on this pull request.
In src/textprop.c:
> + 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)
In src/testdir/test_textprop.vim:
> @@ -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()?
- a list that contains something else that a lists e.g.
[1, 'a']
@yegappan pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
View it on GitHub or unsubscribe.
@yegappan pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
View it on GitHub or unsubscribe.
@yegappan pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
View it on GitHub or unsubscribe.
@yegappan pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
View it on GitHub or unsubscribe.
Since there are no recent comments I'll include this now.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.