mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
Merge 74763a77a98c91ba551287d7465845fd9689a52f into a494ce1c64a2637719a5c1339abf19ec7c48089c
This commit is contained in:
commit
30c1fdaffd
@ -128,6 +128,8 @@ typedef struct {
|
||||
long vcol_sbr; // virtual column after showbreak
|
||||
int need_showbreak; // overlong line, skipping first x chars
|
||||
int dont_use_showbreak; // do not use 'showbreak'
|
||||
int lbr_padding; // inserted columns for linebreak
|
||||
int sbr_padding;
|
||||
#endif
|
||||
#ifdef FEAT_PROP_POPUP
|
||||
int text_prop_above_count;
|
||||
@ -146,6 +148,7 @@ typedef struct {
|
||||
// with win_attr if needed
|
||||
int n_attr_skip; // chars to skip before using extra_attr
|
||||
int c_extra; // extra chars, all the same
|
||||
int is_extra;
|
||||
int c_final; // final char, mandatory if set
|
||||
int extra_for_textprop; // n_extra set for textprop
|
||||
int start_extra_for_textprop; // extra_for_textprop was just set
|
||||
@ -520,6 +523,8 @@ handle_breakindent(win_T *wp, winlinevars_T *wlv)
|
||||
wlv->c_final = NUL;
|
||||
wlv->n_extra = get_breakindent_win(wp,
|
||||
ml_get_buf(wp->w_buffer, wlv->lnum, FALSE));
|
||||
wlv->lbr_padding += get_breakindent_win(wp,
|
||||
ml_get_buf(wp->w_buffer, wlv->lnum, FALSE));
|
||||
if (wlv->row == wlv->startrow)
|
||||
{
|
||||
wlv->n_extra -= win_col_off2(wp);
|
||||
@ -583,6 +588,7 @@ handle_showbreak_and_filler(win_T *wp, winlinevars_T *wlv)
|
||||
wlv->c_final = NUL;
|
||||
wlv->n_extra = (int)STRLEN(sbr);
|
||||
wlv->vcol_sbr = wlv->vcol + MB_CHARLEN(sbr);
|
||||
wlv->sbr_padding += MB_CHARLEN(sbr);
|
||||
|
||||
// Correct start of highlighted area for 'showbreak'.
|
||||
if (wlv->fromcol >= wlv->vcol && wlv->fromcol < wlv->vcol_sbr)
|
||||
@ -910,13 +916,14 @@ draw_screen_line(win_T *wp, winlinevars_T *wlv)
|
||||
// edge for 'cursorcolumn'.
|
||||
wlv->col -= wlv->boguscols;
|
||||
wlv->boguscols = 0;
|
||||
# define VCOL_HLC (wlv->vcol - wlv->vcol_off_co - wlv->vcol_off_tp)
|
||||
# define VCOL_HLC (wlv->vcol - wlv->vcol_off_co - wlv->vcol_off_tp - wlv->lbr_padding)
|
||||
# else
|
||||
# define VCOL_HLC (wlv->vcol - wlv->vcol_off_tp)
|
||||
# endif
|
||||
|
||||
if (wlv->draw_color_col)
|
||||
wlv->draw_color_col = advance_color_col(VCOL_HLC, &wlv->color_cols);
|
||||
wlv->draw_color_col =
|
||||
advance_color_col(VCOL_HLC - wlv->sbr_padding, &wlv->color_cols);
|
||||
|
||||
if (((wp->w_p_cuc
|
||||
&& (int)wp->w_virtcol >= VCOL_HLC - wlv->eol_hl_off
|
||||
@ -959,10 +966,11 @@ draw_screen_line(win_T *wp, winlinevars_T *wlv)
|
||||
if (wlv->line_attr != 0)
|
||||
attr = hl_combine_attr(attr, wlv->line_attr);
|
||||
# endif
|
||||
if (wp->w_p_cuc && VCOL_HLC == (long)wp->w_virtcol
|
||||
if (wp->w_p_cuc &&
|
||||
VCOL_HLC == (long)wp->w_virtcol - wlv->lbr_padding
|
||||
&& wlv->lnum != wp->w_cursor.lnum)
|
||||
attr = hl_combine_attr(attr, HL_ATTR(HLF_CUC));
|
||||
else if (wlv->draw_color_col && VCOL_HLC == *wlv->color_cols)
|
||||
else if (wlv->draw_color_col && VCOL_HLC - wlv->sbr_padding == *wlv->color_cols)
|
||||
attr = hl_combine_attr(attr, HL_ATTR(HLF_MC));
|
||||
ScreenAttrs[wlv->off] = attr;
|
||||
ScreenCols[wlv->off] = wlv->vcol;
|
||||
@ -1273,7 +1281,7 @@ win_line(
|
||||
int is_concealing = FALSE;
|
||||
int did_wcol = FALSE;
|
||||
int old_boguscols = 0;
|
||||
# define VCOL_HLC (wlv.vcol - wlv.vcol_off_co - wlv.vcol_off_tp)
|
||||
# define VCOL_HLC (wlv.vcol - wlv.vcol_off_co - wlv.vcol_off_tp - wlv.lbr_padding)
|
||||
# define FIX_FOR_BOGUSCOLS \
|
||||
{ \
|
||||
wlv.n_extra += wlv.vcol_off_co; \
|
||||
@ -1339,7 +1347,8 @@ win_line(
|
||||
// Check for columns to display for 'colorcolumn'.
|
||||
wlv.color_cols = wp->w_p_cc_cols;
|
||||
if (wlv.color_cols != NULL)
|
||||
wlv.draw_color_col = advance_color_col(VCOL_HLC, &wlv.color_cols);
|
||||
wlv.draw_color_col =
|
||||
advance_color_col(VCOL_HLC - wlv.sbr_padding, &wlv.color_cols);
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_TERMINAL
|
||||
@ -3111,8 +3120,21 @@ win_line(
|
||||
wlv.c_extra = mb_off > 0 ? MB_FILLER_CHAR : ' ';
|
||||
wlv.c_final = NUL;
|
||||
# ifdef FEAT_PROP_POPUP
|
||||
if (wlv.n_extra > 0 && c != TAB)
|
||||
in_linebreak = TRUE;
|
||||
if (wlv.n_extra > 0 && c != TAB)
|
||||
{
|
||||
in_linebreak = TRUE;
|
||||
|
||||
// edge case: current col is colorcol
|
||||
if (wlv.draw_color_col && VCOL_HLC == *wlv.color_cols)
|
||||
{
|
||||
vcol_save_attr = wlv.char_attr;
|
||||
wlv.char_attr =
|
||||
hl_combine_attr(wlv.char_attr, HL_ATTR(HLF_MC));
|
||||
}
|
||||
|
||||
wlv.lbr_padding += win_lbr_chartabsize(&cts, NULL) - 1;
|
||||
wlv.is_extra = 1;
|
||||
}
|
||||
# endif
|
||||
if (VIM_ISWHITE(c))
|
||||
{
|
||||
@ -3971,7 +3993,8 @@ win_line(
|
||||
#ifdef FEAT_SYN_HL
|
||||
// advance to the next 'colorcolumn'
|
||||
if (wlv.draw_color_col)
|
||||
wlv.draw_color_col = advance_color_col(VCOL_HLC, &wlv.color_cols);
|
||||
wlv.draw_color_col =
|
||||
advance_color_col(VCOL_HLC - wlv.sbr_padding, &wlv.color_cols);
|
||||
|
||||
// Highlight the cursor column if 'cursorcolumn' is set. But don't
|
||||
// highlight the cursor position itself.
|
||||
@ -3991,14 +4014,14 @@ win_line(
|
||||
# endif
|
||||
)
|
||||
{
|
||||
if (wp->w_p_cuc && VCOL_HLC == (long)wp->w_virtcol
|
||||
if (wp->w_p_cuc && VCOL_HLC == (long)wp->w_virtcol - wlv.lbr_padding
|
||||
&& lnum != wp->w_cursor.lnum)
|
||||
{
|
||||
vcol_save_attr = wlv.char_attr;
|
||||
wlv.char_attr = hl_combine_attr(wlv.char_attr,
|
||||
HL_ATTR(HLF_CUC));
|
||||
}
|
||||
else if (wlv.draw_color_col && VCOL_HLC == *wlv.color_cols)
|
||||
else if (wlv.draw_color_col && VCOL_HLC - wlv.sbr_padding == *wlv.color_cols && !wlv.is_extra)
|
||||
{
|
||||
vcol_save_attr = wlv.char_attr;
|
||||
wlv.char_attr = hl_combine_attr(wlv.char_attr, HL_ATTR(HLF_MC));
|
||||
@ -4434,6 +4457,10 @@ win_line(
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
if (wlv.n_extra == 0)
|
||||
wlv.is_extra = 0;
|
||||
|
||||
} // for every character in the line
|
||||
#ifdef FEAT_PROP_POPUP
|
||||
vim_free(text_props);
|
||||
|
@ -1,5 +1,5 @@
|
||||
>T+0&#ffffff0|h|e| |q|u|i|c|k| |b|r|o|w|n| |f|o|x| |j|u|m|p|e|d| |o|v|e|r| |t|h|e| @3| +0&#ffd7d7255
|
||||
@1| +0&#ffffff0|l+0&#ffd7d7255|a+0&#ffffff0|z|y| |d|o|g|s| @28
|
||||
>T+0&#ffffff0|h|e| |q|u|i|c|k| |b|r|o|w|n| |f|o|x| |j|u|m|p|e|d| |o|v|e|r| |t|h|e| @4
|
||||
@2|l|a|z|y+0&#ffd7d7255| |d+0&#ffffff0|o+0&#ffd7d7255|g+0&#ffffff0|s| @28
|
||||
|~+0#4040ff13&| @38
|
||||
|~| @38
|
||||
|~| @38
|
||||
|
@ -1,8 +1,8 @@
|
||||
|o+0&#ffffff0|n|e| |o|n|e| |o|n|e| @1|o|n|e| |o|n|e| |o|n|e| |o+0&#e0e0e08|n+0&#ffffff0|e| @11
|
||||
| +0#4040ff13&|>@2| |o+0#0000000&|n|e| |o+0&#ffd7d7255|n+0&#ffffff0|e| |o|n|e| |o|n|e| @19
|
||||
| +0#4040ff13&|>@2| |o+0#0000000&|n|e| |o|n|e| |o|n|e| |o+0&#ffd7d7255|n+0&#ffffff0|e| @19
|
||||
|t|w|o| |t|w|o| |t|w|o| |t|w|o| |||h|i|d@1|e|n||| >h|e|r|e| |t|w|o| |t|w|o| @2
|
||||
|t|h|r|e@1| @1|t|h|r|e@1| |t|h|r|e@1| |t|h|r|e@1| |t+0&#e0e0e08|h+0&#ffffff0|r|e@1| @9
|
||||
| +0#4040ff13&|>@2| |t+0#0000000&|h|r|e|e+0&#ffd7d7255| +0&#ffffff0|t|h|r|e@1| |t|h|r|e@1| |t|h|r|e@1| @11
|
||||
| +0#4040ff13&|>@2| |t+0#0000000&|h|r|e@1| |t|h|r|e|e+0&#ffd7d7255| +0&#ffffff0|t|h|r|e@1| |t|h|r|e@1| @11
|
||||
|~+0#4040ff13&| @38
|
||||
|~| @38
|
||||
|~| @38
|
||||
|
@ -1,8 +1,8 @@
|
||||
|o+0&#ffffff0|n|e| |o|n|e| |o|n|e| @1|o|n|e| |o|n|e| |o|n|e| |o|n|e| @11
|
||||
| +0#4040ff13&|>@2| |o+0#0000000&|n|e| |o+0&#ffd7d7255|n+0&#ffffff0|e| |o|n|e| |o|n|e| @19
|
||||
| +0#4040ff13&|>@2| |o+0#0000000&|n|e| |o|n|e| |o|n|e| |o+0&#ffd7d7255|n+0&#ffffff0|e| @19
|
||||
|t|w|o| |t|w|o| |t|w|o| |t|w|o| |||h|i|d@1|e|n||| |h|e|r|e| |t|w|o| |t|w>o| @2
|
||||
|t|h|r|e@1| @1|t|h|r|e@1| |t|h|r|e@1| |t|h|r|e@1| |t|h|r|e@1| @9
|
||||
| +0#4040ff13&|>@2| |t+0#0000000&|h|r|e|e+0&#ffd7d7255| +0&#ffffff0|t|h|r|e@1| |t|h|r|e@1| |t|h|r|e@1| @11
|
||||
| +0#4040ff13&|>@2| |t+0#0000000&|h|r|e@1| |t|h|r|e|e+0&#ffd7d7255| +0&#ffffff0|t|h|r|e@1| |t|h|r|e@1| @11
|
||||
|~+0#4040ff13&| @38
|
||||
|~| @38
|
||||
|~| @38
|
||||
|
Loading…
x
Reference in New Issue
Block a user