0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 7.4.2326

Problem:    Illegal memory access when Visual selection starts in invalid
            position. (Dominique Pelle)
Solution:   Correct position when needed.
This commit is contained in:
Bram Moolenaar
2016-09-04 20:35:01 +02:00
parent 30180b8dad
commit d5824ce1b5
4 changed files with 28 additions and 0 deletions

View File

@@ -9451,7 +9451,10 @@ get_op_vcol(
#ifdef FEAT_MBYTE
/* prevent from moving onto a trail byte */
if (has_mbyte)
{
check_pos(curwin->w_buffer, &oap->end);
mb_adjustpos(curwin->w_buffer, &oap->end);
}
#endif
getvvcol(curwin, &(oap->start), &oap->start_vcol, NULL, &oap->end_vcol);