fix: fixed the wrong "-" path interpretation in the Go method.
This commit is contained in:
parent
ab1437a15b
commit
638b1c1f78
2 changed files with 6 additions and 4 deletions
|
@ -170,10 +170,7 @@ func (compo *CommandCompo) Serve(c *Context) {
|
|||
c.WithUpdate(u).Run(cmd.Action)
|
||||
if cmd.Widget != nil {
|
||||
cmdUpdates.Close()
|
||||
cmdUpdates, err = c.WithUpdate(u).RunWidget(cmd.Widget)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
cmdUpdates, _ = c.WithUpdate(u).RunWidget(cmd.Widget)
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
|
|
@ -232,6 +232,11 @@ func (c *Context) Go(pth Path, args ...any) error {
|
|||
}
|
||||
var back bool
|
||||
if pth == "-" {
|
||||
if len(c.pathHistory) < 2 {
|
||||
return c.Go("")
|
||||
}
|
||||
pth = c.pathHistory[len(c.pathHistory)-2]
|
||||
c.pathHistory = c.pathHistory[:len(c.pathHistory)-1]
|
||||
}
|
||||
// Getting the screen and changing to
|
||||
// then executing its widget.
|
||||
|
|
Loading…
Reference in a new issue