vscode-gitlens icon indicating copy to clipboard operation
vscode-gitlens copied to clipboard

Add multiselect support to interactive rebase editor

Open eamodio opened this issue 5 years ago • 3 comments

Should be able to shift+select commits to affect

eamodio avatar Nov 19 '20 05:11 eamodio

shift+/ arrows would be great too.

plwalsh avatar Feb 22 '21 22:02 plwalsh

I just started using Gitlens and am quite surprised this isnt possible - via Shift/Ctrl + mouse or arrow keys. Would be super useful as I'm about to rebase squash 70 commits...

nickchomey avatar Jul 11 '24 15:07 nickchomey

Hello, I’d like to work on this but am curious about which implementation makes more sense:

  1. Use MultiDrag from SortableJS
    This offers built-in Shift + Click selection, simplifying selection logic (by relying on onSelect and onDeselect). However, we’ll need to adjust the API to support dragging multiple entries and handle other actions like Alt + Arrow. Also, this could introduce key combinations (Ctrl + Click for non-consecutive selection) that may be unwanted.

  2. Custom Shift + Click Selection
    This tracks selected entries manually, focusing only on consecutive selection. It avoids API changes and WorkspaceEdit conflict issues related to dragging multiple items.

In both cases, we’ll need to visually highlight selected elements and ensure actions from the dropdown apply to all selected entries.

Let me know which approach seems better. Personally, I'm leaning towards option (2) because it does not touch the API - However, if dragging multiple elements is wanted then (1) is the way to go.

EhabY avatar Sep 22 '24 20:09 EhabY