To: vim_dev@googlegroups.com Subject: Patch 8.1.2235 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.2235 Problem: "C" with 'virtualedit' set does not include multi-byte char. Solution: Include the whole multi-byte char. (Nobuhiro Takasaki, closes #5152) Files: src/ops.c, src/testdir/test_virtualedit.vim *** ../vim-8.1.2234/src/ops.c 2019-10-17 22:58:59.066497012 +0200 --- src/ops.c 2019-10-31 03:19:19.586083512 +0100 *************** *** 912,917 **** --- 912,919 ---- oap->end = curwin->w_cursor; curwin->w_cursor = oap->start; } + if (has_mbyte) + mb_adjust_opend(oap); } if (oap->line_count == 1) /* delete characters within one line */ *** ../vim-8.1.2234/src/testdir/test_virtualedit.vim 2019-01-24 17:59:35.143217444 +0100 --- src/testdir/test_virtualedit.vim 2019-10-31 03:15:40.219159103 +0100 *************** *** 73,75 **** --- 73,84 ---- bwipe! set virtualedit= endfunc + + func Test_edit_change() + new + set virtualedit=all + call setline(1, "\t⒌") + normal Cx + call assert_equal('x', getline(1)) + bwipe! + endfunc *** ../vim-8.1.2234/src/version.c 2019-10-30 04:10:00.053774871 +0100 --- src/version.c 2019-10-31 03:17:13.482724044 +0100 *************** *** 743,744 **** --- 743,746 ---- { /* Add new patch number below this line */ + /**/ + 2235, /**/ -- hundred-and-one symptoms of being an internet addict: 8. You spend half of the plane trip with your laptop on your lap...and your child in the overhead compartment. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///