Chat find: re-register a highlight whose shared entry another text removed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -143,7 +143,11 @@ class _ChatFindHighlightState extends State<ChatFindHighlight> {
|
||||
void _register(ChatFindTargets? targets, String? rowKey) {
|
||||
final next = rowKey == null ? null : (rowKey, widget.text);
|
||||
if (identical(targets, _targets) && next == _registered) {
|
||||
if (next != null) targets!.texts[next.$1]![next.$2] = widget.rects;
|
||||
// Another text with the same row and string may have unregistered
|
||||
// the shared entry; put it back.
|
||||
if (next != null) {
|
||||
targets!.texts.putIfAbsent(next.$1, () => {})[next.$2] = widget.rects;
|
||||
}
|
||||
return;
|
||||
}
|
||||
_unregister();
|
||||
|
||||
Reference in New Issue
Block a user