diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-03-05 17:25:39 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-03-05 17:25:39 +0100 |
commit | 20b4f463f4ab50fa9bcc9838aa94101fa5698125 (patch) | |
tree | 8c91ae16ab1ac2c467fe87d8993b056e99e1393a /src/ops.c | |
parent | 2369c15407cf9a730a396ebf9709abb280c5ce48 (diff) | |
download | vim-git-20b4f463f4ab50fa9bcc9838aa94101fa5698125.tar.gz |
patch 7.4.1491v7.4.1491
Problem: Visual-block shift breaks multi-byte characters.
Solution: Compute column differently. (Yasuhiro Matsumoto) Add a test.
Diffstat (limited to 'src/ops.c')
-rw-r--r-- | src/ops.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -410,7 +410,15 @@ shift_block(oparg_T *oap, int amount) { #ifdef FEAT_MBYTE if (has_mbyte) - bd.textstart += (*mb_ptr2len)(bd.textstart); + { + if ((*mb_ptr2len)(bd.textstart) == 1) + ++bd.textstart; + else + { + ws_vcol = 0; + bd.startspaces = 0; + } + } else #endif ++bd.textstart; |