mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
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:
parent
f98da780de
commit
8b8343b8a9
3 changed files with 14 additions and 7 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue