File tree Expand file tree Collapse file tree 2 files changed +10
-17
lines changed Expand file tree Collapse file tree 2 files changed +10
-17
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ package controllers
2
2
3
3
import (
4
4
"github.com/jesseduffield/gocui"
5
- "github.com/jesseduffield/lazygit/pkg/gui/context"
6
5
"github.com/jesseduffield/lazygit/pkg/gui/keybindings"
7
6
"github.com/jesseduffield/lazygit/pkg/gui/types"
8
7
"github.com/jesseduffield/lazygit/pkg/utils"
@@ -58,9 +57,10 @@ func (self *CommitDescriptionController) Context() types.Context {
58
57
func (self * CommitDescriptionController ) GetMouseKeybindings (opts types.KeybindingsOpts ) []* gocui.ViewMouseBinding {
59
58
return []* gocui.ViewMouseBinding {
60
59
{
61
- ViewName : self .Context ().GetViewName (),
62
- Key : gocui .MouseLeft ,
63
- Handler : self .onClick ,
60
+ ViewName : self .Context ().GetViewName (),
61
+ FocusedView : self .c .Contexts ().CommitMessage .GetViewName (),
62
+ Key : gocui .MouseLeft ,
63
+ Handler : self .onClick ,
64
64
},
65
65
}
66
66
}
@@ -137,10 +137,6 @@ func (self *CommitDescriptionController) openCommitMenu() error {
137
137
}
138
138
139
139
func (self * CommitDescriptionController ) onClick (opts gocui.ViewMouseBindingOpts ) error {
140
- // Activate the description panel when the commit message panel is currently active
141
- if self .c .Context ().Current ().GetKey () == context .COMMIT_MESSAGE_CONTEXT_KEY {
142
- self .c .Context ().Replace (self .c .Contexts ().CommitDescription )
143
- }
144
-
140
+ self .c .Context ().Replace (self .c .Contexts ().CommitDescription )
145
141
return nil
146
142
}
Original file line number Diff line number Diff line change @@ -62,9 +62,10 @@ func (self *CommitMessageController) GetKeybindings(opts types.KeybindingsOpts)
62
62
func (self * CommitMessageController ) GetMouseKeybindings (opts types.KeybindingsOpts ) []* gocui.ViewMouseBinding {
63
63
return []* gocui.ViewMouseBinding {
64
64
{
65
- ViewName : self .Context ().GetViewName (),
66
- Key : gocui .MouseLeft ,
67
- Handler : self .onClick ,
65
+ ViewName : self .Context ().GetViewName (),
66
+ FocusedView : self .c .Contexts ().CommitDescription .GetViewName (),
67
+ Key : gocui .MouseLeft ,
68
+ Handler : self .onClick ,
68
69
},
69
70
}
70
71
}
@@ -194,10 +195,6 @@ func (self *CommitMessageController) openCommitMenu() error {
194
195
}
195
196
196
197
func (self * CommitMessageController ) onClick (opts gocui.ViewMouseBindingOpts ) error {
197
- // Activate the commit message panel when the commit description panel is currently active
198
- if self .c .Context ().Current ().GetKey () == context .COMMIT_DESCRIPTION_CONTEXT_KEY {
199
- self .c .Context ().Replace (self .c .Contexts ().CommitMessage )
200
- }
201
-
198
+ self .c .Context ().Replace (self .c .Contexts ().CommitMessage )
202
199
return nil
203
200
}
You can’t perform that action at this time.
0 commit comments