Mercurial > vim
changeset 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 | 7d9d6a327e18 |
children | 2ef6f4092d68 |
files | src/search.c src/testdir/test_visual.vim src/version.c |
diffstat | 3 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/search.c +++ b/src/search.c @@ -4241,7 +4241,11 @@ extend: * line, we get stuck there. Trap this here. */ if (VIsual_mode == 'V' && start_lnum == curwin->w_cursor.lnum) goto extend; - VIsual.lnum = start_lnum; + if (VIsual.lnum != start_lnum) + { + VIsual.lnum = start_lnum; + VIsual.col = 0; + } VIsual_mode = 'V'; redraw_curbuf_later(INVERTED); /* update the inversion */ showmode();