fix: Shift+Enter should delete selection

This commit is contained in:
Krille Fear 2021-06-07 07:37:27 +00:00
parent 53b6c8bb28
commit f4e2a57848
1 changed files with 1 additions and 1 deletions

View File

@ -284,7 +284,7 @@ class InputBar extends StatelessWidget {
final messageWithoutNewLine =
controller.text.substring(0, val.selection.start) +
'\n' +
controller.text.substring(val.selection.start);
controller.text.substring(val.selection.end);
controller.value = TextEditingValue(
text: messageWithoutNewLine,
selection: TextSelection.fromPosition(