Fix bug in mention handler that prevented mentioning someone when jumping to the beginning of a new line
@@ -382,7 +382,7 @@ func (editor *Editor) HideAndResetMentionHandler() {
func (editor *Editor) FindAtSymbolIndexInCurrentWord() int {
newLeft := editor.internalTextView.GetRegionText("left")
for i := len(newLeft) - 1; i >= 0; i-- {
- if newLeft[i] == '@' && (i == 0 || newLeft[i-1] == ' ') {
+ if newLeft[i] == '@' && (i == 0 || newLeft[i-1] == ' ' || newLeft[i-1] == '\n') {
return i
}
}
