diff options
author | watiko <service@mail.watiko.net> | 2016-02-11 15:56:46 +0900 |
---|---|---|
committer | watiko <service@mail.watiko.net> | 2016-02-11 16:37:11 +0900 |
commit | 66571f64a46cba1fd54710fd7f59672cd21e2523 (patch) | |
tree | 6a1e2bcf05dc506fbf35f0823dcbf34aaf5a8619 /src/nvim/normal.c | |
parent | 84281bf675f77f417d26a68611406ef43fd82f7f (diff) | |
download | rneovim-66571f64a46cba1fd54710fd7f59672cd21e2523.tar.gz rneovim-66571f64a46cba1fd54710fd7f59672cd21e2523.tar.bz2 rneovim-66571f64a46cba1fd54710fd7f59672cd21e2523.zip |
vim-patch:7.4.818
Problem: 'linebreak' breaks c% if the last Visual selection was block.
(Chris Morganiser, Issue 389)
Solution: Handle Visual block mode differently. (Christian Brabandt)
https://github.com/vim/vim/commit/89c17c02cac7594c6bb85900d73b1dc70aa78306
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 049d650f86..d4b78b1a79 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -7782,7 +7782,7 @@ static void nv_open(cmdarg_T *cap) n_opencmd(cap); } -// calculate start/end virtual columns for operating in block mode +// Calculate start/end virtual columns for operating in block mode. static void get_op_vcol( oparg_T *oap, colnr_T redo_VIsual_vcol, @@ -7792,11 +7792,14 @@ static void get_op_vcol( colnr_T start; colnr_T end; - if (VIsual_mode != Ctrl_V) { + if (VIsual_mode != Ctrl_V + || (!initial && oap->end.col < curwin->w_width)) { return; } - oap->motion_type = MBLOCK; + if (VIsual_active) { + oap->motion_type = MBLOCK; + } // prevent from moving onto a trail byte if (has_mbyte) { |