`j` and `k` ignore folded lines
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
If you have a folded block of code and you do, for example, 4j, it will move 4 visual lines, ignoring the folded lines, which makes relative line numbers unreliable, as they do take into consideration folded code.
To Reproduce
Steps to reproduce the behavior:
- With relative line numbers on
- Fold a block of code
- Try moving up or down to a line passing the folded block of code with motion k or motion j
Expected behavior
It should take into consideration folded code.
Screenshots

In this example, I've pressed 26 j , it should've moved to the empty line before cin.get();
Instead, it move 26 visual lines, ignoring the folded code inside GetBiggestNumber()
Environment (please complete the following information):
- Extension Version:
1.17.1 - OS Version:
Windows_NT x64 10.0.18363 - VSCode version:
1.51.1
Additional context
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
Start by reproducing the issue in VS Code with relative line numbers, a folded block, and a counted j or k motion. Trace the j/k motion handling and how folded lines are counted, then verify that movement and relative line numbers agree across folded regions. Done means counted motions include folded lines and the behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100