mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
screen: Fix PVS/V560: col never reassigned in this part of code
This commit is contained in:
@@ -2140,7 +2140,6 @@ win_line (
|
|||||||
bool nochange /* not updating for changed text */
|
bool nochange /* not updating for changed text */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
int col = 0; // visual column on screen
|
|
||||||
unsigned off; // offset in ScreenLines/ScreenAttrs
|
unsigned off; // offset in ScreenLines/ScreenAttrs
|
||||||
int c = 0; // init for GCC
|
int c = 0; // init for GCC
|
||||||
long vcol = 0; // virtual column (for tabs)
|
long vcol = 0; // virtual column (for tabs)
|
||||||
@@ -2553,7 +2552,7 @@ win_line (
|
|||||||
ptr = prev_ptr;
|
ptr = prev_ptr;
|
||||||
// If the character fits on the screen, don't need to skip it.
|
// If the character fits on the screen, don't need to skip it.
|
||||||
// Except for a TAB.
|
// Except for a TAB.
|
||||||
if (((*mb_ptr2cells)(ptr) >= c || *ptr == TAB) && col == 0) {
|
if (utf_ptr2cells(ptr) >= c || *ptr == TAB) {
|
||||||
n_skip = v - vcol;
|
n_skip = v - vcol;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2702,11 +2701,11 @@ win_line (
|
|||||||
}
|
}
|
||||||
|
|
||||||
off = (unsigned)(current_ScreenLine - ScreenLines);
|
off = (unsigned)(current_ScreenLine - ScreenLines);
|
||||||
col = 0;
|
int col = 0; // Visual column on screen.
|
||||||
if (wp->w_p_rl) {
|
if (wp->w_p_rl) {
|
||||||
/* Rightleft window: process the text in the normal direction, but put
|
// Rightleft window: process the text in the normal direction, but put
|
||||||
* it in current_ScreenLine[] from right to left. Start at the
|
// it in current_ScreenLine[] from right to left. Start at the
|
||||||
* rightmost column of the window. */
|
// rightmost column of the window.
|
||||||
col = wp->w_width - 1;
|
col = wp->w_width - 1;
|
||||||
off += col;
|
off += col;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user