mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
fix(statuscolumn): update number hl for each screen line (#25277)
This commit is contained in:
parent
473d0aa3e6
commit
dc6c11394b
@ -1410,8 +1410,7 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool number_onl
|
|||||||
statuscol.width = win_col_off(wp) - (cmdwin_type != 0 && wp == curwin);
|
statuscol.width = win_col_off(wp) - (cmdwin_type != 0 && wp == curwin);
|
||||||
statuscol.use_cul = use_cursor_line_highlight(wp, lnum);
|
statuscol.use_cul = use_cursor_line_highlight(wp, lnum);
|
||||||
statuscol.sign_cul_id = statuscol.use_cul ? sign_cul.hl_id : 0;
|
statuscol.sign_cul_id = statuscol.use_cul ? sign_cul.hl_id : 0;
|
||||||
statuscol.num_attr = sign_num.hl_id ? syn_id2attr(sign_num.hl_id)
|
statuscol.num_attr = sign_num.hl_id > 0 ? syn_id2attr(sign_num.hl_id) : 0;
|
||||||
: get_line_number_attr(wp, &wlv);
|
|
||||||
} else {
|
} else {
|
||||||
if (sign_cul.hl_id > 0) {
|
if (sign_cul.hl_id > 0) {
|
||||||
sign_cul_attr = syn_id2attr(sign_cul.hl_id);
|
sign_cul_attr = syn_id2attr(sign_cul.hl_id);
|
||||||
@ -1740,6 +1739,9 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool number_onl
|
|||||||
wlv.draw_state = WL_STC;
|
wlv.draw_state = WL_STC;
|
||||||
// Draw the 'statuscolumn' if option is set.
|
// Draw the 'statuscolumn' if option is set.
|
||||||
if (statuscol.draw) {
|
if (statuscol.draw) {
|
||||||
|
if (sign_num.hl_id == 0) {
|
||||||
|
statuscol.num_attr = get_line_number_attr(wp, &wlv);
|
||||||
|
}
|
||||||
if (statuscol.textp == NULL) {
|
if (statuscol.textp == NULL) {
|
||||||
v = (ptr - line);
|
v = (ptr - line);
|
||||||
get_statuscol_str(wp, lnum, wlv.row - startrow - wlv.filler_lines, &statuscol);
|
get_statuscol_str(wp, lnum, wlv.row - startrow - wlv.filler_lines, &statuscol);
|
||||||
|
@ -475,7 +475,7 @@ describe('statuscolumn', function()
|
|||||||
aaaaaaaaa |
|
aaaaaaaaa |
|
||||||
{1:virtual-2 15}virt_line1 |
|
{1:virtual-2 15}virt_line1 |
|
||||||
{1:virtual-2 15}virt_line2 |
|
{1:virtual-2 15}virt_line2 |
|
||||||
{1:buffer 0 16}{5:^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}|
|
{4:buffer 0 16}{5:^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}|
|
||||||
{5:aaaaaaaaa }|
|
{5:aaaaaaaaa }|
|
||||||
{1:virtual-1 16}END |
|
{1:virtual-1 16}END |
|
||||||
{0:~ }|
|
{0:~ }|
|
||||||
|
Loading…
Reference in New Issue
Block a user