1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-25 12:24:47 +02:00

Fix crash when dragging from below the end of the diff upwards and then staging the range

We need to clamp the range start index of a selection range in the same way as
we clamp the selection index.
This commit is contained in:
Stefan Haller 2025-04-11 10:14:04 +02:00
parent a3ae1c8e4d
commit 825e5c23c1

View File

@ -188,7 +188,7 @@ func (s *State) selectLineWithoutRangeCheck(newSelectedLineIdx int) {
}
func (s *State) SelectNewLineForRange(newSelectedLineIdx int) {
s.rangeStartLineIdx = newSelectedLineIdx
s.rangeStartLineIdx = s.clampLineIdx(newSelectedLineIdx)
s.selectMode = RANGE