-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow :wincmd to accept a count
Lets the `:wincmd` command accept a count like its documentation suggests, previously it could only accept a range, which lead to some ambiguity on which attribute should be used when executing `wincmd` using `nvim_cmd`. Closes #19662. Also fixes a typo in a related Vim test which should be fixed in Vim by vim/vim#10932.
- Loading branch information
Showing
4 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
local helpers = require("test.functional.helpers")(after_each) | ||
local clear = helpers.clear | ||
local eq = helpers.eq | ||
local meths = helpers.meths | ||
local command = helpers.command | ||
|
||
it(':wincmd accepts a count', function() | ||
clear() | ||
command('vsplit') | ||
command('wincmd 2 w') | ||
eq(meths.get_current_win().id, 1000) | ||
end) |