Skip to content

Multicursor delete line #64679

@eykamp

Description

@eykamp

Issue Type: Bug

Deleting lines with editor.action.deleteLines acts weird with multicursor.

  1. Create a file with 12 or more lines; create multicursor selections on 3 consecutive lines, with 2 selections per line (for a total of 6 selections). Run editor.action.deleteLines. I expect those three lines will be deleted, but they aren't.

  2. Do the same thing, but with just one selection per line. editor.action.deleteLines still acts weird; I would expect the three cursors to collapse into a single cursor; instead there are cursors awkwardly hanging out down below.

Sublime Text handles these situations correctly; see their behavior for a good model of what should happen.

In both cases, I feel that the cursors should probably move back to the beginning of the line, but that may be years of expectation built up by using Sublime. However, that makes the cursors more predictable, which is critical with multicursor (as some cursors may be off the screen so anticipating their behavior properly is really important).

VS Code version: Code 1.29.1 (bc24f98, 2018-11-15T19:13:36.375Z)
OS version: Windows_NT x64 10.0.16299

System Info
Item Value
CPUs Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz (4 x 2496)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 7.83GB (1.14GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (20)
Extension Author (truncated) Version
increment-selection alb 0.0.3
Bookmarks ale 10.0.0
quote-flipper all 0.0.1
unique-lines bib 1.0.0
bracket-pair-colorizer Coe 1.0.61
xml Dot 2.3.2
vscode-open-in-github fab 1.1.3
code-runner for 0.9.5
rainbow-csv mec 0.8.0
python ms- 2018.11.0
cpptools ms- 0.20.1
sublime-keybindings ms- 4.0.0
vsliveshare ms- 0.3.1013
vscode-docker Pet 0.4.0
code-settings-sync Sha 3.2.2
whiteviz spy 0.6.0
vscode-arduino vsc 0.2.23
debug web 0.22.0
better-align wwm 1.1.6
cursor-align yo1 1.0.4

Metadata

Metadata

Assignees

Labels

editor-commandsEditor text manipulation commandseditor-multicursorEditor multiple cursor issuesfeature-requestRequest for new features or functionalityverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions