Commands in macro after switching tabs are ignored
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
While recording a macro, if you switch tabs and apply commands they will not work as intended. Any commands run after a tab switch ([1-9]gt) are ignored. In regular vim, these commands should work across tab switches.
To Reproduce
Steps to reproduce the behavior:
For example, let's say I have two files:
File 1:
foo
bar
File 2:
hello
With my cursor at the start of the line in each file, I start a macro in file 1.
Vd2gtp1gt
This macro should delete the line the cursor is on in file 1 to the next line on file 2. After recording this macro, the files look like this:
File 1:
bar
File 2:
hello
foo
Now, if this macro is run again on file 1, bar will get deleted but will not get copied to file 2.
File 1 (empty):
File 2:
hello
foo
Expected behavior
A clear and concise description of what you expected to happen.
In regular vim, macros are supported across tabs and commands run after switching tabs should still work. In the example for instance, "bar" should have been copied to file 2.
Screenshots
N/A
Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.31.0
- VSCode version: 1.105.1
- OS: Windows 11
Additional context
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by reproducing the recorded macro with Vd2gtp1gt, then trace macro recording/replay around the [1-9]gt tab-switch command. Done means commands after switching tabs replay correctly, including copying "bar" to the second file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100