diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-01-23 19:36:39 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-01-24 02:02:40 -0500 |
commit | e22d0cf12c985e670fcc562a6ce75e82a0b3a741 (patch) | |
tree | 0b98a8c821b4249951d34adcf0ea75d4955f58c1 /src/nvim/ops.c | |
parent | 376fa27237d0a1ce5ef9967473920ac7d68fcf29 (diff) | |
download | rneovim-e22d0cf12c985e670fcc562a6ce75e82a0b3a741.tar.gz rneovim-e22d0cf12c985e670fcc562a6ce75e82a0b3a741.tar.bz2 rneovim-e22d0cf12c985e670fcc562a6ce75e82a0b3a741.zip |
vim-patch:8.2.0147: block Visual mode operators not correct when 'linebreak' set
Problem: Block Visual mode operators not correct when 'linebreak' set.
Solution: Set w_p_lbr to lbr_saved more often. (Ken Takata, closes vim/vim#5524)
https://github.com/vim/vim/commit/03c3bd9fd094c1aede2e8fe3ad8fd25b9f033053
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 641323ae5e..bcf54087f5 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -4414,7 +4414,10 @@ static void block_prep(oparg_T *oap, struct block_def *bdp, linenr_T lnum, char_u *line; char_u *prev_pstart; char_u *prev_pend; + const int lbr_saved = curwin->w_p_lbr; + // Avoid a problem with unwanted linebreaks in block mode. + curwin->w_p_lbr = false; bdp->startspaces = 0; bdp->endspaces = 0; bdp->textlen = 0; @@ -4514,6 +4517,7 @@ static void block_prep(oparg_T *oap, struct block_def *bdp, linenr_T lnum, } bdp->textcol = (colnr_T) (pstart - line); bdp->textstart = pstart; + curwin->w_p_lbr = lbr_saved; } /// Handle the add/subtract operator. |