Scrolling with `j` and pasting hangs the editor for seconds
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
To Reproduce
- Create a file with 300+ lines
- Copy some text (for example using
yy) and move the cursor to line 1 - Hold
juntil you're on the last line - Press
p
Expected behavior
The copied text is pasted on the next frame or two (like 30ms)
Actual behavior
VS Code hangs for upwards of 5 seconds
Environment (please complete the following information):
- Extension (VsCodeVim) version: v1.24.3
- VSCode version: 1.73.1
- OS: macOS 13.0.1
Additional context
I have these VsCodeVim settings
"vim.useSystemClipboard": true,
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["Y"],
"after": ["y", "$"]
}
],
Here's a profile of the issue: pasting-after-scrolling-vscode.cpuprofile.txt
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 reported slowdown in VSCodeVim using the listed steps on a 300+ line file, then inspect the provided VS Code renderer CPU profile. Compare the time spent scrolling with the paste operation and verify that pasting after holding j completes within the expected next frame or two.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100