diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-10-21 02:04:35 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-10-21 02:18:00 +0200 |
commit | 82b8382abe6c533fbdd01529cfc93a8d1c5231e2 (patch) | |
tree | 8ba892eed36830b4a2d716b25f93579d9537bf0f /src/nvim/normal.c | |
parent | 6338199b76e661e85e4061122be99c57bf198cf8 (diff) | |
download | rneovim-82b8382abe6c533fbdd01529cfc93a8d1c5231e2.tar.gz rneovim-82b8382abe6c533fbdd01529cfc93a8d1c5231e2.tar.bz2 rneovim-82b8382abe6c533fbdd01529cfc93a8d1c5231e2.zip |
vim-patch:8.0.0962
closes #6726
Problem: Crash with virtualedit and joining lines.
(Joshua T Corbin, Neovim #6726)
Solution: When using a mark check that coladd is valid.
https://github.com/vim/vim/commit/9aa156912867c05e0a6480925afe11c590378f09
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index c40ed58550..1103fe15d2 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -1548,8 +1548,10 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank) } oap->start = VIsual; - if (VIsual_mode == 'V') + if (VIsual_mode == 'V') { oap->start.col = 0; + oap->start.coladd = 0; + } } /* @@ -6260,15 +6262,18 @@ static void nv_gomark(cmdarg_T *cap) } else nv_cursormark(cap, cap->arg, pos); - /* May need to clear the coladd that a mark includes. */ - if (!virtual_active()) + // May need to clear the coladd that a mark includes. + if (!virtual_active()) { curwin->w_cursor.coladd = 0; + } + check_cursor_col(); if (cap->oap->op_type == OP_NOP && pos != NULL && (pos == (pos_T *)-1 || !equalpos(old_cursor, *pos)) && (fdo_flags & FDO_MARK) - && old_KeyTyped) + && old_KeyTyped) { foldOpenCursor(); + } } /* |