summaryrefslogtreecommitdiff
path: root/src/ops.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-03-05 17:25:39 +0100
committerBram Moolenaar <Bram@vim.org>2016-03-05 17:25:39 +0100
commit20b4f463f4ab50fa9bcc9838aa94101fa5698125 (patch)
tree8c91ae16ab1ac2c467fe87d8993b056e99e1393a /src/ops.c
parent2369c15407cf9a730a396ebf9709abb280c5ce48 (diff)
downloadvim-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.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ops.c b/src/ops.c
index 4ad982f7f..fa159e983 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -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;