Mercurial > vim
comparison src/textprop.c @ 16549:08557bad0b9d v8.1.1278
patch 8.1.1278: missing change for "combine" field
commit https://github.com/vim/vim/commit/58187f1c8a7095dbe0237a8208fa7f7bc899f246
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 5 16:33:47 2019 +0200
patch 8.1.1278: missing change for "combine" field
Problem: Missing change for "combine" field.
Solution: Also change the textprop implementation.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 05 May 2019 16:45:05 +0200 |
parents | 176872829dc2 |
children | 1fc9cd08cf3c |
comparison
equal
deleted
inserted
replaced
16548:37e39c5ddf12 | 16549:08557bad0b9d |
---|---|
731 return; | 731 return; |
732 } | 732 } |
733 prop->pt_hl_id = hl_id; | 733 prop->pt_hl_id = hl_id; |
734 } | 734 } |
735 | 735 |
736 di = dict_find(dict, (char_u *)"combine", -1); | |
737 if (di != NULL) | |
738 { | |
739 if (tv_get_number(&di->di_tv)) | |
740 prop->pt_flags |= PT_FLAG_COMBINE; | |
741 else | |
742 prop->pt_flags &= ~PT_FLAG_COMBINE; | |
743 } | |
744 | |
736 di = dict_find(dict, (char_u *)"priority", -1); | 745 di = dict_find(dict, (char_u *)"priority", -1); |
737 if (di != NULL) | 746 if (di != NULL) |
738 prop->pt_priority = tv_get_number(&di->di_tv); | 747 prop->pt_priority = tv_get_number(&di->di_tv); |
739 | 748 |
740 di = dict_find(dict, (char_u *)"start_incl", -1); | 749 di = dict_find(dict, (char_u *)"start_incl", -1); |
843 dict_T *d = rettv->vval.v_dict; | 852 dict_T *d = rettv->vval.v_dict; |
844 | 853 |
845 if (prop->pt_hl_id > 0) | 854 if (prop->pt_hl_id > 0) |
846 dict_add_string(d, "highlight", syn_id2name(prop->pt_hl_id)); | 855 dict_add_string(d, "highlight", syn_id2name(prop->pt_hl_id)); |
847 dict_add_number(d, "priority", prop->pt_priority); | 856 dict_add_number(d, "priority", prop->pt_priority); |
857 dict_add_number(d, "combine", | |
858 (prop->pt_flags & PT_FLAG_COMBINE) ? 1 : 0); | |
848 dict_add_number(d, "start_incl", | 859 dict_add_number(d, "start_incl", |
849 (prop->pt_flags & PT_FLAG_INS_START_INCL) ? 1 : 0); | 860 (prop->pt_flags & PT_FLAG_INS_START_INCL) ? 1 : 0); |
850 dict_add_number(d, "end_incl", | 861 dict_add_number(d, "end_incl", |
851 (prop->pt_flags & PT_FLAG_INS_END_INCL) ? 1 : 0); | 862 (prop->pt_flags & PT_FLAG_INS_END_INCL) ? 1 : 0); |
852 if (buf != NULL) | 863 if (buf != NULL) |