From b3dbc9d90b4e4f3ec627ab2a17238281097e330c Mon Sep 17 00:00:00 2001 From: watiko Date: Fri, 15 Jan 2016 09:37:59 +0900 Subject: vim-patch:7.4.778 Problem: Coverity warns for uninitialized variable. Solution: Change condition of assignment. https://github.com/vim/vim/commit/ae2fe73abc954b8fd3dbd7994daa8e31e6690bd0 --- src/nvim/ops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/nvim/ops.c') diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 78eebc520f..943dd7a2da 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -4531,10 +4531,10 @@ int do_addsub(int command, linenr_T Prenum1, bool g_cmd) // reset subtract = false; negative = false; - if (visual && VIsual_mode != Ctrl_V) { - col = 0; - } else { + if (visual && VIsual_mode == Ctrl_V) { col = startcol; + } else { + col = 0; } Prenum1 += offset; curwin->w_set_curswant = true; -- cgit