Run PTY tasks after layout so that they get the correct view size

This is important when using a pager that draws a horizontal line across the
entire width of the view; when changing from a file or directory that has only
unstaged (or only staged) changes to one that has both, the main view is split
in half, but the PTY task would be run on the view in its old state, so the
horizonal line would be too long and wrap around.
This commit is contained in:
Stefan Haller 2024-06-12 17:23:42 +02:00
parent f98da780de
commit 8b8343b8a9
3 changed files with 14 additions and 7 deletions

View file

@ -189,12 +189,7 @@ func (self *guiCommon) GetInitialKeybindingsWithCustomCommands() ([]*types.Bindi
}
func (self *guiCommon) AfterLayout(f func() error) {
select {
case self.gui.afterLayoutFuncs <- f:
default:
// hopefully this never happens
self.gui.c.Log.Error("afterLayoutFuncs channel is full, skipping function")
}
self.gui.afterLayout(f)
}
func (self *guiCommon) RunningIntegrationTest() bool {