vim-patch:9.0.1506: line number not displayed when using 'smoothscroll' (#23453)

Problem:    Line number not displayed when using 'smoothscroll'.
Solution:   Adjust condition for showing the line number. (closes vim/vim#12333)

88bb3e0a48
This commit is contained in:
zeertzjq
2023-05-03 07:21:09 +08:00
committed by GitHub
parent 9909668111
commit 62ecb05957
5 changed files with 62 additions and 3 deletions

View File

@@ -609,7 +609,7 @@ static void handle_lnum_col(win_T *wp, winlinevars_T *wlv, int num_signs, int si
} else {
// Draw the line number (empty space after wrapping).
if (wlv->row == wlv->startrow + wlv->filler_lines
&& (wp->w_skipcol == 0 || wlv->row > wp->w_winrow || (wp->w_p_nu && wp->w_p_rnu))) {
&& (wp->w_skipcol == 0 || wlv->row > 0 || (wp->w_p_nu && wp->w_p_rnu))) {
get_line_number_str(wp, wlv->lnum, wlv->extra, sizeof(wlv->extra));
if (wp->w_skipcol > 0 && wlv->startrow == 0) {
for (wlv->p_extra = wlv->extra; *wlv->p_extra == ' '; wlv->p_extra++) {