mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 11:25:33 +00:00
vim-patch:9.1.1858: v:register not reset after Visual mode command (#36215)
Problem: v:register not reset after Visual mode command.
(laktak)
Solution: Reset v:register if Visual mode was active before
do_pending_operator() (zeertzjq)
fixes: vim/vim#18579
related: vim/vim#5305
closes: vim/vim#18583
b3b47e540d
(cherry picked from commit aeeadddac4)
This commit is contained in:
committed by
github-actions[bot]
parent
f93747ee3a
commit
ad172eb762
@@ -981,6 +981,8 @@ static void normal_finish_command(NormalState *s)
|
||||
s->old_mapped_len = typebuf_maplen();
|
||||
}
|
||||
|
||||
const bool prev_VIsual_active = VIsual_active;
|
||||
|
||||
// If an operation is pending, handle it. But not for K_IGNORE or
|
||||
// K_MOUSEMOVE.
|
||||
if (s->ca.cmdchar != K_IGNORE && s->ca.cmdchar != K_MOUSEMOVE) {
|
||||
@@ -998,7 +1000,7 @@ normal_end:
|
||||
|
||||
msg_nowait = false;
|
||||
|
||||
if (finish_op) {
|
||||
if (finish_op || prev_VIsual_active) {
|
||||
set_reg_var(get_default_register_name());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user