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/normal.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/normal.c')
-rw-r--r-- | src/nvim/normal.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 3aff3cef84..be6819d19f 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -1846,10 +1846,7 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank) restart_edit = 0; // Restore linebreak, so that when the user edits it looks as before. - if (curwin->w_p_lbr != lbr_saved) { - curwin->w_p_lbr = lbr_saved; - get_op_vcol(oap, redo_VIsual_mode, false); - } + curwin->w_p_lbr = lbr_saved; // Reset finish_op now, don't want it set inside edit(). finish_op = false; @@ -1935,10 +1932,7 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank) restart_edit = 0; // Restore linebreak, so that when the user edits it looks as before. - if (curwin->w_p_lbr != lbr_saved) { - curwin->w_p_lbr = lbr_saved; - get_op_vcol(oap, redo_VIsual_mode, false); - } + curwin->w_p_lbr = lbr_saved; op_insert(oap, cap->count1); @@ -1964,10 +1958,7 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank) CancelRedo(); } else { // Restore linebreak, so that when the user edits it looks as before. - if (curwin->w_p_lbr != lbr_saved) { - curwin->w_p_lbr = lbr_saved; - get_op_vcol(oap, redo_VIsual_mode, false); - } + curwin->w_p_lbr = lbr_saved; op_replace(oap, cap->nchar); } |