diff options
author | ZyX <kp-pav@yandex.ru> | 2018-04-22 19:43:27 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2018-04-22 19:43:27 +0300 |
commit | 3c7cc03f345ace2cdeeb71163ad5ed2c10c59a1f (patch) | |
tree | be9a7edac5586f62eef382e35dd7d2180a56a188 /src | |
parent | 4ff4e66fd78e02dd8e37b00de91856082b95b0eb (diff) | |
download | rneovim-3c7cc03f345ace2cdeeb71163ad5ed2c10c59a1f.tar.gz rneovim-3c7cc03f345ace2cdeeb71163ad5ed2c10c59a1f.tar.bz2 rneovim-3c7cc03f345ace2cdeeb71163ad5ed2c10c59a1f.zip |
screen: Fix PVS/V560: col never reassigned in this part of code
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/screen.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 3671537751..8f2b7b1f04 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -2140,7 +2140,6 @@ win_line ( bool nochange /* not updating for changed text */ ) { - int col = 0; // visual column on screen unsigned off; // offset in ScreenLines/ScreenAttrs int c = 0; // init for GCC long vcol = 0; // virtual column (for tabs) @@ -2553,7 +2552,7 @@ win_line ( ptr = prev_ptr; // If the character fits on the screen, don't need to skip it. // Except for a TAB. - if (((*mb_ptr2cells)(ptr) >= c || *ptr == TAB) && col == 0) { + if (utf_ptr2cells(ptr) >= c || *ptr == TAB) { n_skip = v - vcol; } } @@ -2702,11 +2701,11 @@ win_line ( } off = (unsigned)(current_ScreenLine - ScreenLines); - col = 0; + int col = 0; // Visual column on screen. if (wp->w_p_rl) { - /* Rightleft window: process the text in the normal direction, but put - * it in current_ScreenLine[] from right to left. Start at the - * rightmost column of the window. */ + // Rightleft window: process the text in the normal direction, but put + // it in current_ScreenLine[] from right to left. Start at the + // rightmost column of the window. col = wp->w_width - 1; off += col; } |