mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Remove ErrorMsg
There is no reason any more for application code to show error messages in a panel. Just return an error instead.
This commit is contained in:
@ -2,6 +2,7 @@ package controllers
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"math"
|
||||
"math/rand"
|
||||
@ -88,7 +89,7 @@ func (self *FilesController) createResetMenu() error {
|
||||
OnPress: func() error {
|
||||
self.c.LogAction(self.c.Tr.Actions.RemoveStagedFiles)
|
||||
if !self.c.Helpers().WorkingTree.IsWorkingTreeDirty() {
|
||||
return self.c.ErrorMsg(self.c.Tr.NoTrackedStagedFilesStash)
|
||||
return errors.New(self.c.Tr.NoTrackedStagedFilesStash)
|
||||
}
|
||||
if err := self.c.Git().Stash.SaveStagedChanges("[lazygit] tmp stash"); err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user