mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 18:06:30 +00:00
fix(extmarks): make empty "conceal" respect &conceallevel = 1 (#24785)
This treats extmark conceal more like matchadd() conceal.
This commit is contained in:
@@ -332,7 +332,7 @@ next_mark:
|
||||
|
||||
int attr = 0;
|
||||
size_t j = 0;
|
||||
bool conceal = 0;
|
||||
int conceal = 0;
|
||||
int conceal_char = 0;
|
||||
int conceal_attr = 0;
|
||||
TriState spell = kNone;
|
||||
@@ -362,8 +362,9 @@ next_mark:
|
||||
attr = hl_combine_attr(attr, item.attr_id);
|
||||
}
|
||||
if (active && item.decor.conceal) {
|
||||
conceal = true;
|
||||
if (item.start_row == state->row && item.start_col == col && item.decor.conceal_char) {
|
||||
conceal = 1;
|
||||
if (item.start_row == state->row && item.start_col == col) {
|
||||
conceal = 2;
|
||||
conceal_char = item.decor.conceal_char;
|
||||
state->col_until = MIN(state->col_until, item.start_col);
|
||||
conceal_attr = item.attr_id;
|
||||
|
@@ -101,7 +101,7 @@ typedef struct {
|
||||
int current;
|
||||
int eol_col;
|
||||
|
||||
bool conceal;
|
||||
int conceal;
|
||||
int conceal_char;
|
||||
int conceal_attr;
|
||||
|
||||
|
@@ -2179,11 +2179,7 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool number_onl
|
||||
if (has_decor && v > 0) {
|
||||
// extmarks take preceedence over syntax.c
|
||||
decor_attr = hl_combine_attr(decor_attr, extmark_attr);
|
||||
|
||||
decor_conceal = decor_state.conceal;
|
||||
if (decor_conceal && decor_state.conceal_char) {
|
||||
decor_conceal = 2; // really??
|
||||
}
|
||||
can_spell = TRISTATE_TO_BOOL(decor_state.spell, can_spell);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user