1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Support multiple contexts within one command, add tests, update doc

This commit is contained in:
Yam Liu
2024-07-27 16:40:41 +00:00
committed by Stefan Haller
parent 206b2c6f0b
commit 542030f190
5 changed files with 93 additions and 18 deletions

View File

@ -39,11 +39,11 @@ func (self *Client) GetCustomCommandKeybindings() ([]*types.Binding, error) {
bindings := []*types.Binding{}
for _, customCommand := range self.customCommands {
handler := self.handlerCreator.call(customCommand)
binding, err := self.keybindingCreator.call(customCommand, handler)
compoundBindings, err := self.keybindingCreator.call(customCommand, handler)
if err != nil {
return nil, err
}
bindings = append(bindings, binding)
bindings = append(bindings, compoundBindings...)
}
return bindings, nil