Make chatView#refreshSelectionAndScrollToSelection more concise
@@ -204,8 +204,11 @@ func intToString(value int) string {
}
func (chatView *ChatView) refreshSelectionAndScrollToSelection() {
+ if chatView.selection == -1 {
+ //Empty basically clears the highlights
+ chatView.internalTextView.Highlight("")
+ } else {
chatView.internalTextView.Highlight(intToString(chatView.selection))
- if chatView.selection != -1 {
chatView.internalTextView.ScrollToHighlight()
}
}
