comparison src/search.c @ 10881:8f6df2f6d2fc v8.0.0330

patch 8.0.0330: illegal memory access after "vapo" commit https://github.com/vim/vim/commit/84b2a381451e9068b09ef6d85f5e8cf1598e7355 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Feb 17 11:40:00 2017 +0100 patch 8.0.0330: illegal memory access after "vapo" Problem: Illegal memory access after "vapo". (Dominique Pelle) Solution: Fix the cursor column.
author Christian Brabandt <cb@256bit.org>
date Fri, 17 Feb 2017 11:45:04 +0100
parents 37a441352da2
children 9b4574d95571
comparison
equal deleted inserted replaced
10880:7d9d6a327e18 10881:8f6df2f6d2fc
4239 { 4239 {
4240 /* Problem: when doing "Vipipip" nothing happens in a single white 4240 /* Problem: when doing "Vipipip" nothing happens in a single white
4241 * line, we get stuck there. Trap this here. */ 4241 * line, we get stuck there. Trap this here. */
4242 if (VIsual_mode == 'V' && start_lnum == curwin->w_cursor.lnum) 4242 if (VIsual_mode == 'V' && start_lnum == curwin->w_cursor.lnum)
4243 goto extend; 4243 goto extend;
4244 VIsual.lnum = start_lnum; 4244 if (VIsual.lnum != start_lnum)
4245 {
4246 VIsual.lnum = start_lnum;
4247 VIsual.col = 0;
4248 }
4245 VIsual_mode = 'V'; 4249 VIsual_mode = 'V';
4246 redraw_curbuf_later(INVERTED); /* update the inversion */ 4250 redraw_curbuf_later(INVERTED); /* update the inversion */
4247 showmode(); 4251 showmode();
4248 } 4252 }
4249 else 4253 else