Browse Source

don't crash

pull/253/head
Rasmus Lindroth 3 years ago
parent
commit
b12e8b4f5b
  1. 2
      ui/cmdbar.go
  2. 2
      ui/timeline.go

2
ui/cmdbar.go

@ -282,7 +282,7 @@ func (c *CmdBar) DoneFunc(key tcell.Key) {
func (c *CmdBar) Autocomplete(curr string) []string {
var entries []string
words := strings.Split(":blocking,:boosts,:bookmarks,:clear-notifications,:compose,:favorites,:favorited,:follow-tag,:followers,:following,:help,:h,:history,:move-pane,:lists,:list-placement,:list-split,:muting,:newer,:preferences,:profile,:proportions,:refetch,:requests,:saved,:stick-to-top,:tag,:timeline,:tl,:unfollow-tag,:user,:pane,:quit,:q", ",")
words := strings.Split(":blocking,:boosts,:bookmarks,:clear-notifications,:close-pane,:compose,:favorites,:favorited,:follow-tag,:followers,:following,:help,:h,:history,:move-pane,:lists,:list-placement,:list-split,:muting,:newer,:preferences,:profile,:proportions,:refetch,:requests,:saved,:stick-to-top,:tag,:timeline,:tl,:unfollow-tag,:user,:pane,:quit,:q", ",")
if curr == "" {
return entries
}

2
ui/timeline.go

@ -153,7 +153,7 @@ func (tl *Timeline) MoveCurrentPaneEnd() {
}
func (tl *Timeline) CloseCurrentPane() {
if len(tl.Feeds) == 0 {
if len(tl.Feeds) < 2 {
return
}
feeds := tl.Feeds[tl.FeedFocusIndex]

Loading…
Cancel
Save