VSCodeVim / VSCodeVim/Vim

Cursor does not move to new line after using `:LINE-NUMBER`

Open
#8,661 0 comments 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

Type: Bug

To Reproduce

  1. Open any file which is longer than VS code screen size and move to any line which is not currently visible in the screen.
  2. Use :LINE-NUMBER to jump to a line which is not currently visible in the viewport and is having lower number than current cursor line
  3. Viewport brings the line in the centre of the screen but not the cursor
  4. Press any of insert command sequence
  5. The viewport jumps back to original location of the cursor and enters insert mode

Expected behavior
Expected behaviour is further commands should execute at the jumped line and not the original line where the cursor was.

Extension version: 1.26.1
VS Code version: Code 1.83.0 (e7e037083ff4455cf320e344325dacb480062c3c, 2023-10-03T16:13:10.518Z)
OS version: Darwin arm64 23.0.0
Modes:
Remote OS version: Linux x64 5.15.0-1039-azure

System Info
Item Value
CPUs Apple M1 (8 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 2, 2, 2
Memory (System) 16.00GB (0.02GB free)
Process Argv --crash-reporter-id fef9eeb8-edba-4487-9b53-a87524f22d90
Screen Reader no
VM 0%
Item Value
Remote SSH: simulator
OS Linux x64 5.15.0-1039-azure
CPUs Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz (4 x 2793)
Memory (System) 15.63GB (14.49GB free)
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263cf:30856253
vscaat:30438848
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
282f8724:30602487
89544117:30613380
showlangstatbar:30737416
03d35959:30757346
ecj1e332:30736112
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxpt:30805730
pythonnoceb:30805159
copilotsettingc:30839828
asynctok:30821568
dsvsc013:30795093
dsvsc014:30804076
diffeditorv1:30821571
dsvsc015:30845448

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

Reproduce the issue in a file longer than the VS Code viewport by jumping with :LINE-NUMBER to a lower, non-visible line and then using an insert command. Compare the cursor position with the viewport after the jump; done means subsequent insert commands act on the jumped-to line rather than returning to the original cursor location.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience
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.