Writing to clipboard register during macro recording breaks the recording
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Issue Type: Bug
Describe the bug
If I use a clipboard register while recording a macro with the same-named register it breaks the recording. When I press q to try to cancel the recording I get an error about not being able to use 'concat' on 'undefined' and the buffer stays in recording mode until I close it.
To Reproduce
- Start a macro recording with
qa. - Write to the same clipboard register eg with
"ayw. - Try to end the recording by pressing
q.
Expected behavior
In neovim, and classic vim too, I think, the clipboard registers are independent of the macro registers. Having them shared might help with issues like #1658, so I don't mind that, but the clash I've described could be handled better by refusing to update a clipboard register while a macro is being recorded into it, and showing a warning at that point.
Extension version: 1.12.4
VS Code version: Code 1.41.1 (26076a4de974ead31f97692a0d32f90d735645c0, 2019-12-18T14:57:51.166Z)
OS version: Darwin x64 19.2.0
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i5-8210Y CPU @ 1.60GHz (4 x 1600) |
| GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on oop_rasterization: disabled_off protected_video_decode: unavailable_off rasterization: enabled skia_renderer: disabled_off surface_control: disabled_off surface_synchronization: enabled_on video_decode: enabled viz_display_compositor: enabled_on viz_hit_test_surface_layer: disabled_off webgl: enabled webgl2: enabled |
| Load (avg) | 2, 1, 1 |
| Memory (System) | 8.00GB (0.96GB free) |
| Process Argv | -psn_0_3781531 |
| Screen Reader | no |
| VM | 0% |
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 macro-recording sequence with qa, "ayw, and q described in the issue, then trace the macro and clipboard-register handling that produces the concat on undefined error. Done means recording no longer becomes stuck when the same register is written during recording, with a warning or other clear handling, and the reproduction is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100