mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 19:18:34 +00:00
vim-patch:8.1.2229: color number column above/below cursor #15409
Problem: Cannot color number column above/below cursor differently.
Solution: Add LineNrAbove and LineNrBelow. (Shaun Brady, closes vim/vim#624)
efae76ab1a
This commit is contained in:
@@ -2812,6 +2812,15 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow,
|
||||
n_extra = number_width(wp) + 1;
|
||||
char_attr = win_hl_attr(wp, HLF_N);
|
||||
|
||||
if (wp->w_p_rnu && lnum < wp->w_cursor.lnum) {
|
||||
// Use LineNrAbove
|
||||
char_attr = win_hl_attr(wp, HLF_LNA);
|
||||
}
|
||||
if (wp->w_p_rnu && lnum > wp->w_cursor.lnum) {
|
||||
// Use LineNrBelow
|
||||
char_attr = win_hl_attr(wp, HLF_LNB);
|
||||
}
|
||||
|
||||
sign_attrs_T *num_sattr = sign_get_attr(SIGN_NUMHL, sattrs, 0, 1);
|
||||
if (num_sattr != NULL) {
|
||||
// :sign defined with "numhl" highlight.
|
||||
|
Reference in New Issue
Block a user