-
Notifications
You must be signed in to change notification settings - Fork 620
Open
Labels
type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
Relevant console output or errors
None. The Analysis Server returns the correct completion list, but the editor fails to apply the replacement range correctly.How did this error happen?
How did this error happen?*
Description: When selecting a suggestion from the autocomplete popup, DartPad appends the full suggestion string to the existing prefix rather than replacing it.
Reproduction Steps:
Open [dartpad.dev](https://dartpad.dev/).
Start typing a widget or class (e.g., Text.ri).
When the autocomplete popup appears, select rich() by:
Clicking the item in the popup.
Pressing Tab.
Pressing Enter.
Observe that the result is Text.richri instead of the expected Text.rich().
Relevant Dart code
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(body: Center(child: Text.ri)), // Trigger autocomplete on 'ri'
);
}
}What OS did this error occur on?
Linux
What browser(s) did you experience this issue on?
Chromium based (Chrome, Edge)
Do you have any additional information?
Also occurred on Zen Browser (Firefox-based).
Version: Dart 3.10.7 • Flutter 3.38.7 (Stable channel)
Testing: Confirmed that Shift + Enter and Shift + Tab do not change the behavior.
Consistency: This is a persistent issue across different widgets and methods, not limited to the Text class.
Screenshots:

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)