fix(drawline): initialize variable

src/nvim/drawline.c: In function ‘draw_virt_text’:
src/nvim/drawline.c:298:28: warning: ‘col’ may be used uninitialized [-Wmaybe-uninitialized]
  298 |       state->eol_col = col + 1;
      |                        ~~~~^~~
This commit is contained in:
Andreas Schneider 2023-04-21 10:58:46 +02:00
parent ef7ae66eef
commit e9280a68f7

View File

@ -282,7 +282,7 @@ static void draw_virt_text(win_T *wp, buf_T *buf, int col_off, int *end_col, int
if (item->win_col < 0) {
continue;
}
int col;
int col = 0;
if (item->decor.ui_watched) {
// send mark position to UI
col = item->win_col;