mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02:00
Remove return value of RenderToMainViews and some related functions
This commit is contained in:
parent
b91beb68e1
commit
5446683881
29 changed files with 109 additions and 113 deletions
|
@ -81,7 +81,7 @@ func (self *DiffHelper) ExitDiffMode() error {
|
|||
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC})
|
||||
}
|
||||
|
||||
func (self *DiffHelper) RenderDiff() error {
|
||||
func (self *DiffHelper) RenderDiff() {
|
||||
args := self.DiffArgs()
|
||||
cmdObj := self.c.Git().Diff.DiffCmdObj(args)
|
||||
task := types.NewRunPtyTask(cmdObj.GetCmd())
|
||||
|
@ -91,7 +91,7 @@ func (self *DiffHelper) RenderDiff() error {
|
|||
"git diff "+strings.Join(args, " "),
|
||||
)
|
||||
|
||||
return self.c.RenderToMainViews(types.RefreshMainOpts{
|
||||
self.c.RenderToMainViews(types.RefreshMainOpts{
|
||||
Pair: self.c.MainViewPairs().Normal,
|
||||
Main: &types.ViewUpdateOpts{
|
||||
Title: "Diff",
|
||||
|
@ -141,12 +141,12 @@ func (self *DiffHelper) currentlySelectedFilename() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
func (self *DiffHelper) WithDiffModeCheck(f func() error) error {
|
||||
func (self *DiffHelper) WithDiffModeCheck(f func()) {
|
||||
if self.c.Modes().Diffing.Active() {
|
||||
return self.RenderDiff()
|
||||
self.RenderDiff()
|
||||
} else {
|
||||
f()
|
||||
}
|
||||
|
||||
return f()
|
||||
}
|
||||
|
||||
func (self *DiffHelper) IgnoringWhitespaceSubTitle() string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue