mirror of
https://github.com/neovim/neovim.git
synced 2025-09-23 19:48:32 +00:00
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)
03c3bd9fd0
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user