1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +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

View File

@ -112,7 +112,7 @@ func (s *State) SelectingHunk() bool {
} }
func (s *State) SelectingRange() 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 { func (s *State) SelectingLine() bool {