mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 05:05:00 -07:00
fix(api): don't use stl 'fillchar' for "use_statuscol_lnum" (#27501)
Problem: nvim_eval_statusline() uses "stl" from 'fillchars' with "use_statuscol_lnum". Solution: Reorder "fillchar" else chain.
This commit is contained in:
parent
478273a423
commit
5fd1bac65e
@ -2203,17 +2203,6 @@ Dictionary nvim_eval_statusline(String str, Dict(eval_statusline) *opts, Arena *
|
||||
statuscol_T statuscol = { 0 };
|
||||
SignTextAttrs sattrs[SIGN_SHOW_MAX] = { 0 };
|
||||
|
||||
if (opts->use_tabline) {
|
||||
fillchar = schar_from_ascii(' ');
|
||||
} else {
|
||||
if (fillchar == 0) {
|
||||
if (opts->use_winbar) {
|
||||
fillchar = wp->w_p_fcs_chars.wbr;
|
||||
} else {
|
||||
int attr;
|
||||
fillchar = fillchar_status(&attr, wp);
|
||||
}
|
||||
}
|
||||
if (statuscol_lnum) {
|
||||
int line_id = 0;
|
||||
int cul_id = 0;
|
||||
@ -2246,6 +2235,12 @@ Dictionary nvim_eval_statusline(String str, Dict(eval_statusline) *opts, Arena *
|
||||
set_vim_var_nr(VV_LNUM, lnum);
|
||||
set_vim_var_nr(VV_RELNUM, labs(get_cursor_rel_lnum(wp, lnum)));
|
||||
set_vim_var_nr(VV_VIRTNUM, 0);
|
||||
} else if (fillchar == 0 && !opts->use_tabline) {
|
||||
if (opts->use_winbar) {
|
||||
fillchar = wp->w_p_fcs_chars.wbr;
|
||||
} else {
|
||||
int attr;
|
||||
fillchar = fillchar_status(&attr, wp);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3806,7 +3806,8 @@ describe('API', function()
|
||||
it('works with statuscolumn', function()
|
||||
exec([[
|
||||
let &stc='%C%s%=%l '
|
||||
set cul nu nuw=3 scl=yes:2 fdc=2
|
||||
" should not use "stl" from 'fillchars'
|
||||
set cul nu nuw=3 scl=yes:2 fdc=2 fillchars=stl:#
|
||||
call setline(1, repeat(['aaaaa'], 5))
|
||||
let g:ns = nvim_create_namespace('')
|
||||
call sign_define('a', {'text':'aa', 'texthl':'IncSearch', 'numhl':'Normal'})
|
||||
|
Loading…
Reference in New Issue
Block a user