diff options
author | Famiu Haque <famiuhaque@protonmail.com> | 2022-08-17 17:50:40 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-17 19:50:40 +0800 |
commit | f5588ee8968c564f6f7b0e42ac0ad44f83489659 (patch) | |
tree | 80da58afe698f9cb6ce1731319cce40cc04055c3 /src | |
parent | 7a076306e4e35371160d1a5d09c92744b8461b57 (diff) | |
download | rneovim-f5588ee8968c564f6f7b0e42ac0ad44f83489659.tar.gz rneovim-f5588ee8968c564f6f7b0e42ac0ad44f83489659.tar.bz2 rneovim-f5588ee8968c564f6f7b0e42ac0ad44f83489659.zip |
feat: allow :wincmd to accept a count (#19815)
Let :wincmd command accept a count like what its documentation suggests.
Previously it could only accept a range, which led to some ambiguity on
which attribute should be used when executing :wincmd using nvim_cmd.
Closes #19662.
Also fix a typo in a related Vim test:
vim-patch:9.0.0223: typo in diffmode test
Problem: Typo in diffmode test.
Solution: Fix the typo. (closes vim/vim#10932)
https://github.com/vim/vim/commit/5fd6ab820b4a0aaa5c6020852f39d118375fab49
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_cmds.lua | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_diffmode.vim | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua index 37f12a7600..4bed1e94b9 100644 --- a/src/nvim/ex_cmds.lua +++ b/src/nvim/ex_cmds.lua @@ -3181,7 +3181,7 @@ module.cmds = { }, { command='wincmd', - flags=bit.bor(NEEDARG, WORD1, RANGE, CMDWIN, LOCK_OK), + flags=bit.bor(NEEDARG, WORD1, RANGE, COUNT, CMDWIN, LOCK_OK), addr_type='ADDR_OTHER', func='ex_wincmd', }, diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim index 1dbbe578c5..ea453b7174 100644 --- a/src/nvim/testdir/test_diffmode.vim +++ b/src/nvim/testdir/test_diffmode.vim @@ -137,7 +137,7 @@ func Common_vert_split() " Test diffoff diffoff! - 1wincmd 2 + 1wincmd w let &diff = 1 let &fdm = diff_fdm let &fdc = diff_fdc |