diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-07-19 19:39:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-19 19:39:46 +0200 |
commit | 1745e59ac15fa1b72adc7ec8b8b19615ab390651 (patch) | |
tree | 94678a502dcf5b312d1dd1769709ba6ee679ca66 | |
parent | a46fe2e615bc5f4431cad04b67ac5ba0b67ed86c (diff) | |
parent | f42bb50392b948739de6dd8ff5890a9cec0168be (diff) | |
download | rneovim-1745e59ac15fa1b72adc7ec8b8b19615ab390651.tar.gz rneovim-1745e59ac15fa1b72adc7ec8b8b19615ab390651.tar.bz2 rneovim-1745e59ac15fa1b72adc7ec8b8b19615ab390651.zip |
Merge #10543 'PVS/V560'
-rw-r--r-- | src/nvim/screen.c | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 2f8b1b6b02..bf2342a0cf 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -3774,15 +3774,14 @@ win_line ( n_attr3 = 1; } - /* - * At end of the text line or just after the last character. - */ + // At end of the text line or just after the last character. if (c == NUL) { long prevcol = (long)(ptr - line) - 1; - /* we're not really at that column when skipping some text */ - if ((long)(wp->w_p_wrap ? wp->w_skipcol : wp->w_leftcol) > prevcol) - ++prevcol; + // we're not really at that column when skipping some text + if ((long)(wp->w_p_wrap ? wp->w_skipcol : wp->w_leftcol) > prevcol) { + prevcol++; + } // Invert at least one char, used for Visual and empty line or // highlight match at end of line. If it's beyond the last @@ -3805,8 +3804,7 @@ win_line ( && ((area_attr != 0 && vcol == fromcol && (VIsual_mode != Ctrl_V || lnum == VIsual.lnum - || lnum == curwin->w_cursor.lnum) - && c == NUL) + || lnum == curwin->w_cursor.lnum)) // highlight 'hlsearch' match at end of line || prevcol_hl_flag)) { int n = 0; @@ -4033,7 +4031,7 @@ win_line ( && filler_todo <= 0 && (wp->w_p_rl ? col == 0 : col == grid->Columns - 1) && (*ptr != NUL - || (wp->w_p_list && lcs_eol_one > 0) + || lcs_eol_one > 0 || (n_extra && (c_extra != NUL || *p_extra != NUL)))) { c = wp->w_p_lcs_chars.ext; char_attr = win_hl_attr(wp, HLF_AT); @@ -4047,14 +4045,15 @@ win_line ( } } - /* advance to the next 'colorcolumn' */ - if (draw_color_col) + // advance to the next 'colorcolumn' + if (draw_color_col) { draw_color_col = advance_color_col(VCOL_HLC, &color_cols); + } - /* Highlight the cursor column if 'cursorcolumn' is set. But don't - * highlight the cursor position itself. - * Also highlight the 'colorcolumn' if it is different than - * 'cursorcolumn' */ + // Highlight the cursor column if 'cursorcolumn' is set. But don't + // highlight the cursor position itself. + // Also highlight the 'colorcolumn' if it is different than + // 'cursorcolumn' vcol_save_attr = -1; if (draw_state == WL_LINE && !lnum_in_visual_area && search_attr == 0 && area_attr == 0) { @@ -4073,10 +4072,8 @@ win_line ( char_attr = hl_combine_attr(line_attr_lowprio, char_attr); } - /* - * Store character to be displayed. - * Skip characters that are left of the screen for 'nowrap'. - */ + // Store character to be displayed. + // Skip characters that are left of the screen for 'nowrap'. vcol_prev = vcol; if (draw_state < WL_LINE || n_skip <= 0) { // |