aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIhor Antonov <ngortheone@gmail.com>2019-07-19 10:58:31 -0400
committerIhor Antonov <ngortheone@gmail.com>2019-07-19 10:58:31 -0400
commit91bbd07417f18e3cce179953d8252cefb43e7e80 (patch)
tree24db958f68e554bc4111b29293ff5ff436307f51
parenta46fe2e615bc5f4431cad04b67ac5ba0b67ed86c (diff)
downloadrneovim-91bbd07417f18e3cce179953d8252cefb43e7e80.tar.gz
rneovim-91bbd07417f18e3cce179953d8252cefb43e7e80.tar.bz2
rneovim-91bbd07417f18e3cce179953d8252cefb43e7e80.zip
pvs/V560: A part of conditional expression is always true
c == '\000' is always true because of the if branch it is already in
-rw-r--r--src/nvim/screen.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 2f8b1b6b02..ec73c670e6 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;