@@ -32,20 +32,20 @@ extension ComposeContentAutocomplete on ComposeContentController {
32
32
}
33
33
34
34
final textUntilCursor = text.substring (0 , selection.end);
35
- for (int position = selection.end - 1 ; position >= earliest; position -- ) {
36
- if (textUntilCursor[position ] != '@' ) {
35
+ for (int pos = selection.end - 1 ; pos >= earliest; pos -- ) {
36
+ if (textUntilCursor[pos ] != '@' ) {
37
37
continue ;
38
38
}
39
- final match = mentionAutocompleteMarkerRegex .matchAsPrefix (textUntilCursor, position );
39
+ final match = _mentionIntentRegex .matchAsPrefix (textUntilCursor, pos );
40
40
if (match == null ) {
41
41
continue ;
42
42
}
43
- if (selection.start < position ) {
43
+ if (selection.start < pos ) {
44
44
// See comment about [TextSelection.isCollapsed] above.
45
45
return null ;
46
46
}
47
47
return AutocompleteIntent (
48
- syntaxStart: position ,
48
+ syntaxStart: pos ,
49
49
query: MentionAutocompleteQuery (match[2 ]! , silent: match[1 ]! == '_' ),
50
50
textEditingValue: value);
51
51
}
@@ -62,7 +62,7 @@ extension ComposeTopicAutocomplete on ComposeTopicController {
62
62
}
63
63
}
64
64
65
- final RegExp mentionAutocompleteMarkerRegex = (() {
65
+ final RegExp _mentionIntentRegex = (() {
66
66
// What's likely to come before an @-mention: the start of the string,
67
67
// whitespace, or punctuation. Letters are unlikely; in that case an email
68
68
// might be intended. (By punctuation, we mean *some* punctuation, like "(".
0 commit comments