1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-23 12:18:51 +02:00

Fix pressing escape after clicking in diff view (#3828)

- **PR Description**

When clicking in a single-file diff view to enter staging (or custom
patch editing, when coming from the commit files panel), you needed to
press escape twice to exit, where the first press would seemingly do
nothing.
This commit is contained in:
Stefan Haller 2024-08-17 11:34:10 +02:00 committed by GitHub
commit 8bcfa3660a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -112,7 +112,7 @@ func (s *State) SelectingHunk() bool {
}
func (s *State) SelectingRange() bool {
return s.selectMode == RANGE
return s.selectMode == RANGE && (s.rangeIsSticky || s.rangeStartLineIdx != s.selectedLineIdx)
}
func (s *State) SelectingLine() bool {