mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-07 13:42:01 +02:00
refresh the staging panel on successful commit
apply formatting
This commit is contained in:
parent
6127e487dd
commit
776d8f4d2e
@ -9,6 +9,7 @@ import (
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/controllers/helpers"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/modes/cherrypicking"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/services/custom_commands"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||
"github.com/jesseduffield/lazygit/pkg/snake"
|
||||
)
|
||||
|
||||
@ -92,6 +93,9 @@ func (gui *Gui) resetControllers() {
|
||||
|
||||
onCommitSuccess := func() {
|
||||
gui.State.savedCommitMessage = ""
|
||||
_ = gui.c.Refresh(types.RefreshOptions{
|
||||
Scope: []types.RefreshableView{types.STAGING},
|
||||
})
|
||||
}
|
||||
|
||||
commitMessageController := controllers.NewCommitMessageController(
|
||||
|
@ -53,8 +53,12 @@ var Staged = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Contains(commitMessage),
|
||||
)
|
||||
|
||||
t.Views().StagingSecondary().IsFocused()
|
||||
t.Views().StagingSecondary().
|
||||
IsEmpty()
|
||||
|
||||
// TODO: assert that the staging panel has been refreshed (it currently does not get correctly refreshed)
|
||||
t.Views().Staging().
|
||||
IsFocused().
|
||||
Content(Contains("+myfile content")).
|
||||
Content(DoesNotContain("+with a second line"))
|
||||
},
|
||||
})
|
||||
|
@ -53,8 +53,12 @@ var StagedWithoutHooks = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Contains("WIP" + commitMessage),
|
||||
)
|
||||
|
||||
t.Views().StagingSecondary().IsFocused()
|
||||
t.Views().StagingSecondary().
|
||||
IsEmpty()
|
||||
|
||||
// TODO: assert that the staging panel has been refreshed (it currently does not get correctly refreshed)
|
||||
t.Views().Staging().
|
||||
IsFocused().
|
||||
Content(Contains("+myfile content")).
|
||||
Content(DoesNotContain("+with a second line"))
|
||||
},
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user