mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
Merge pull request #26662 from neovim/backport-26660-to-release-0.9
[Backport release-0.9] vim-patch:9.0.2178: reg_executing() wrong for :normal with range
This commit is contained in:
commit
1bb3f74f1e
@ -1177,6 +1177,7 @@ int do_execreg(int regname, int colon, int addcr, int silent)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
reg_executing = regname == 0 ? '"' : regname; // disable the 'q' command
|
reg_executing = regname == 0 ? '"' : regname; // disable the 'q' command
|
||||||
|
pending_end_reg_executing = false;
|
||||||
}
|
}
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
@ -800,6 +800,23 @@ func Test_end_reg_executing()
|
|||||||
bwipe!
|
bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_reg_executing_in_range_normal()
|
||||||
|
new
|
||||||
|
set showcmd
|
||||||
|
call setline(1, range(10))
|
||||||
|
let g:log = []
|
||||||
|
nnoremap s <Cmd>let g:log += [reg_executing()]<CR>
|
||||||
|
let @r = 's'
|
||||||
|
|
||||||
|
%normal @r
|
||||||
|
call assert_equal(repeat(['r'], 10), g:log)
|
||||||
|
|
||||||
|
nunmap s
|
||||||
|
unlet g:log
|
||||||
|
set showcmd&
|
||||||
|
bwipe!
|
||||||
|
endfunc
|
||||||
|
|
||||||
" An operator-pending mode mapping shouldn't be applied to keys typed in
|
" An operator-pending mode mapping shouldn't be applied to keys typed in
|
||||||
" Insert mode immediately after a character search when replaying.
|
" Insert mode immediately after a character search when replaying.
|
||||||
func Test_replay_charsearch_omap()
|
func Test_replay_charsearch_omap()
|
||||||
|
Loading…
Reference in New Issue
Block a user