jesseduffield.lazygit/pkg
Stefan Haller eda4ad1192 Drag selected commits to a new position
Pressing the left button on the current selection now starts a drag
that moves the selected commits, both in the normal commits view and
for todos during an interactive rebase. A press anywhere else falls
through to the usual click handling, so dragging from an unselected
line still creates a range selection, and releasing without having
moved collapses the selection to the pressed commit like a plain click
would.

While dragging, the insertion point follows the pointer: rows below
the dragged block insert after the pointed-at commit, rows above it
insert before it, and during a rebase the destination is limited to
the contiguous block of movable todos around the selection. gocui
moves the view cursor along with the pointer, so each drag event moves
it back to keep the original selection highlighted.

The move happens on release. The model may have been refreshed during
the drag, so the dragged commits are located again by their identity
(hash, subject, todo action); if they no longer form a unique
contiguous block, the drop is ignored rather than guessing.
2026-07-31 08:37:28 +02:00
..
app Move dragged commits in one rebase 2026-07-31 08:37:28 +02:00
cheatsheet Render every key for a binding in the cheatsheet 2026-05-25 15:18:18 +02:00
commands Move dragged commits in one rebase 2026-07-31 08:37:28 +02:00
common Move NewDummyCommon to pkg/common 2025-05-06 09:43:26 +02:00
config Change default spinner frames and rate 2026-07-31 08:03:40 +02:00
constants Make the links in the status panel point to the current version rather than master 2024-03-22 08:13:59 +01:00
env Support bare worktrees where worktree does not have its own .git file 2023-08-07 22:40:53 +10:00
fakes Modernize all codes 2025-11-15 10:46:23 +01:00
gocui Route mouse events to their originating view during a drag gesture 2026-07-31 08:22:35 +02:00
gui Drag selected commits to a new position 2026-07-31 08:37:28 +02:00
i18n Show commit insertion points during a drag 2026-07-31 08:37:28 +02:00
integration Drag selected commits to a new position 2026-07-31 08:37:28 +02:00
jsonschema Fold legacy quit-alt1 into the multi-key quit binding 2026-05-25 15:32:47 +02:00
logs Fix Windows linter errors 2026-06-16 16:21:13 +02:00
snake Enable intrange linter, and fix warnings 2025-06-30 18:30:11 +02:00
tasks Handle a command task's end-of-input on the UI thread 2026-07-17 12:35:54 +02:00
theme Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
updates Change direct access to Common.UserConfig to a getter 2024-08-18 10:24:52 +02:00
utils Move dragged commits in one rebase 2026-07-31 08:37:28 +02:00