Mercurial > vim
comparison src/drawline.c @ 34557:28dab9103dd5 v9.1.0179
patch 9.1.0179: 'wincolor' highlight missing with "below" virtual text
Commit: https://github.com/vim/vim/commit/9352c282928f6cb25060249c157a28803c6efa9d
Author: zeertzjq <zeertzjq@outlook.com>
Date: Thu Mar 14 18:16:56 2024 +0100
patch 9.1.0179: 'wincolor' highlight missing with "below" virtual text
Problem: 'wincolor' highlight missing with "below" virtual text.
Solution: Subtract n_attr_skip from n_attr. Combine 'wincolor' with
other highlights when 'nowrap' is set. (zeertzjq)
closes: #14196
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 14 Mar 2024 18:30:03 +0100 |
parents | 4d8d41b7a8eb |
children | ef55fe2ac8be |
comparison
equal
deleted
inserted
replaced
34556:91428f34746f | 34557:28dab9103dd5 |
---|---|
810 } | 810 } |
811 | 811 |
812 *p_extra = l; | 812 *p_extra = l; |
813 *n_extra = n_used + before + after + padding; | 813 *n_extra = n_used + before + after + padding; |
814 *n_attr = mb_charlen(*p_extra); | 814 *n_attr = mb_charlen(*p_extra); |
815 if (above) | |
816 *n_attr -= padding + after; | |
817 | |
818 // n_attr_skip will not be decremented before draw_state is | 815 // n_attr_skip will not be decremented before draw_state is |
819 // WL_LINE | 816 // WL_LINE |
820 *n_attr_skip = before + (padding > 0 ? padding : 0); | 817 *n_attr_skip = before + (padding > 0 ? padding : 0); |
818 *n_attr -= *n_attr_skip; | |
819 if (above) | |
820 *n_attr -= after; | |
821 } | 821 } |
822 } | 822 } |
823 } | 823 } |
824 | 824 |
825 if (n_attr == NULL) | 825 if (n_attr == NULL) |
944 if (wlv->draw_color_col) | 944 if (wlv->draw_color_col) |
945 wlv->draw_color_col = advance_color_col( | 945 wlv->draw_color_col = advance_color_col( |
946 VCOL_HLC, &wlv->color_cols); | 946 VCOL_HLC, &wlv->color_cols); |
947 | 947 |
948 int attr = wlv->win_attr; | 948 int attr = wlv->win_attr; |
949 if (wp->w_p_cuc && VCOL_HLC == (long)wp->w_virtcol) | 949 # ifdef LINE_ATTR |
950 attr = HL_ATTR(HLF_CUC); | 950 if (wlv->line_attr != 0) |
951 attr = hl_combine_attr(attr, wlv->line_attr); | |
952 # endif | |
953 if (wp->w_p_cuc && VCOL_HLC == (long)wp->w_virtcol | |
954 && wlv->lnum != wp->w_cursor.lnum) | |
955 attr = hl_combine_attr(attr, HL_ATTR(HLF_CUC)); | |
951 else if (wlv->draw_color_col && VCOL_HLC == *wlv->color_cols) | 956 else if (wlv->draw_color_col && VCOL_HLC == *wlv->color_cols) |
952 attr = HL_ATTR(HLF_MC); | 957 attr = hl_combine_attr(attr, HL_ATTR(HLF_MC)); |
953 # ifdef LINE_ATTR | |
954 else if (wlv->line_attr != 0) | |
955 attr = wlv->line_attr; | |
956 # endif | |
957 ScreenAttrs[wlv->off++] = attr; | 958 ScreenAttrs[wlv->off++] = attr; |
958 | 959 |
959 if (VCOL_HLC >= rightmost_vcol | 960 if (VCOL_HLC >= rightmost_vcol |
960 # ifdef LINE_ATTR | 961 # ifdef LINE_ATTR |
961 && wlv->line_attr == 0 | 962 && wlv->line_attr == 0 |