VSCodeVim / VSCodeVim/Vim

`vit, A` starts insert at the wrong position

Open
#3,888 1 comment 0 reactions 0 assignees View on GitHub

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

Given some HTML like this (| is cursor position):

<span |class="foo">Hello</span>

...typing vit to select the inner tag followed by A to append to the selection places the cursor in the wrong place:

<span |class="foo">Hello</span>

Screen Recording 2019-07-12 at 7 33 48 AM

To Reproduce

See above.

Expected behavior

The insert cursor should appear at the end of the visual selection, not at the end of the line.

Screenshots

See above.

Environment (please complete the following information):

Extension version: 1.8.1
VS Code version: Code 1.36.1 (2213894ea0415ee8c85c5eea0d0ff81ecc191529, 2019-07-08T22:56:38.504Z)
OS version: Darwin x64 18.6.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 x 4000)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
oop_rasterization: unavailable_off
protected_video_decode: unavailable_off
rasterization: unavailable_off
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 16.00GB (0.70GB free)
Process Argv .
Screen Reader no
VM 0%

Additional context

N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files or tests are named. Reproduce the issue in VS Code using the reported HTML and the vit then A sequence, then trace the visual-selection handling; done means the insert cursor appears at the end of the visual selection rather than the end of the line.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.