Last commit broke selection
MODIFY
internal/ui/chatview.go
internal/ui/chatview.go
@@ -74,8 +74,7 @@ func NewChatView(session *discordgo.Session, ownUserID string) *ChatView {
return nil
}
- if chatView.selectionMode && chatView.selection > 0 &&
- chatView.selection < len(chatView.data) && event.Modifiers() == tcell.ModNone {
+ if chatView.selectionMode && event.Modifiers() == tcell.ModNone {
if event.Key() == tcell.KeyUp {
if chatView.selection == -1 {
chatView.selection = len(chatView.data) - 1
@@ -120,7 +119,7 @@ func NewChatView(session *discordgo.Session, ownUserID string) *ChatView {
return nil
}
- if chatView.onMessageAction != nil {
+ if chatView.selection > 0 && chatView.selection < len(chatView.data) && chatView.onMessageAction != nil {
return chatView.onMessageAction(chatView.data[chatView.selection], event)
}
}

Last commit broke selection