forked from sloum/bombadillo
Makes the first history position reloadable
This commit is contained in:
parent
3a226f3769
commit
2c9c00ab8d
10
client.go
10
client.go
|
@ -726,9 +726,13 @@ func (c *client) ReloadPage() error {
|
|||
return fmt.Errorf("There is no page to reload")
|
||||
}
|
||||
url := c.PageState.History[c.PageState.Position].Location.Full
|
||||
err := c.PageState.NavigateHistory(-1)
|
||||
if err != nil {
|
||||
return err
|
||||
if c.PageState.Length == 1 {
|
||||
c.PageState.Position--
|
||||
} else {
|
||||
err := c.PageState.NavigateHistory(-1)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
length := c.PageState.Length
|
||||
c.Visit(url)
|
||||
|
|
Loading…
Reference in New Issue