Smart Relative Line loses state when changing tabs
Open
Nobody has claimed this yet.
kind/bug
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
If another tab gets focus and it's on a different Vim mode, line mode becomes wrong.
To Reproduce
Steps to reproduce the behavior:
- Open two new tabs and add some empty lines to them
- Leave first tab on normal mode, second tab on insert mode
- Change from first to second tab (Ctrl+PgDown)
Expected behavior
Line mode should be absolute, but it is relative
Screenshots

Environment (please complete the following information):
- Extension (VsCodeVim) version: v1.21.6
- VSCode version / OS:
Version: 1.58.2 (system setup)
Commit: c3f126316369cd610563c75b1b1725e0679adfb3
Date: 2021-07-14T22:10:15.214Z
Electron: 12.0.13
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Windows_NT x64 10.0.19042
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
Reproduce the issue in VSCodeVim by opening two tabs, leaving them in different Vim modes, and switching tabs with Ctrl+PgDown. Trace how tab changes update Vim mode and line mode state; done when switching to the insert-mode tab preserves absolute line mode as expected.
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
- 35/100