mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 20:36:03 +02:00
Fix pressing escape after clicking in diff view
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. The reason for this was that after clicking in the diff we end up in non-sticky range select mode, but only with a single line selected, which is basically indistinguishable from line select mode.
This commit is contained in:
parent
7676572358
commit
0e4d266a52
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue