Cursor is at start of line with lines_longer_than_80_chars
See original GitHub issueIssue Type: Bug
When an issue is found with the linter rule lines_longer_than_80_chars
enabled, the cursor is placed at the start of the offending line.
As the next most likely action is to move the cursor to character 80 (or nearby at least), it would save keystrokes if the cursor were automatically placed there when the error is found.
To reproduce this, enable the lines_longer_than_80_chars
linter rule in your analysis_options.yaml
file, and make yourself a really long comment line:
/// The handle used by all calls to [getInt], [setInt], [getBool], and [setBool].
Press F8 to go to the next problem in files, and your cursor should be placed at the start of your long line, rather at the 80th character.
Extension version: 3.21.1 VS Code version: Code 1.55.0 (c185983a683d14c396952dd432459097bc7f757f, 2021-03-30T16:01:55.261Z) OS version: Windows_NT x64 10.0.19042
System Info
Item | Value |
---|---|
CPUs | AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx (8 x 2296) |
GPU Status | 2d_canvas: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on protected_video_decode: enabled rasterization: enabled skia_renderer: enabled_on video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | undefined |
Memory (System) | 13.95GB (5.69GB free) |
Process Argv | –crash-reporter-id 18f46c6e-60cd-45d3-a2f1-fe06aa8b9f5a |
Screen Reader | yes |
VM | 0% |
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspyt653:30270858
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstry914:30276682
pythonvsdeb440:30248342
pythonvsded773:30248341
pythonvspyt875:30259475
pythontb:30283811
openwslfolder:30282073
vspre833:30267464
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30276952
pythondataviewer:30285071
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (4 by maintainers)
Top GitHub Comments
Legend, thank you so much.
Take care,
Chris Norman
On Sun, 11 Apr 2021 at 19:51, Danny Tuppeny @.***> wrote:
Great! Updating the lint and not needing an option definitely sounds better. I filed a PR with what I think the change is here:
https://github.com/dart-lang/linter/pull/2578
After trying it out, I’m not concerned about the reduced squiggle length - it’s pretty noticeable even for a single character, and it’s actually a lot less noisy than before so I prefer it.
I’ll close this issue as a dupe of the linter issue since there’s nothing to do here in the VS Code extension - if the fix ships in the SDK, you’ll get it automatically when updating to a future SDK version.
If you find any other places you think can/should be improved (for screen readers or otherwise), please do file additional issues. Thanks!