1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-07 01:09:45 +02:00

Escape out of hunk mode only if it was turned on by the user

If hunk mode is on by default because of the config, then it's annoying for
escape to go to line mode.
This commit is contained in:
Stefan Haller
2025-07-04 14:35:48 +02:00
parent 2961c991a4
commit 0a73123a66
3 changed files with 27 additions and 10 deletions

View File

@ -170,7 +170,7 @@ func (self *PatchBuildingController) Escape() error {
context := self.c.Contexts().CustomPatchBuilder
state := context.GetState()
if state.SelectingRange() || state.SelectingHunk() {
if state.SelectingRange() || state.SelectingHunkEnabledByUser() {
state.SetLineSelectMode()
self.c.PostRefreshUpdate(context)
return nil