From 2c0a21a6383d4b730439a03eca37bd76a4cd5c2a Mon Sep 17 00:00:00 2001 From: X Code Date: Fri, 31 Mar 2023 20:01:11 -0700 Subject: [PATCH] Upgrade to 7.0.4 --- CHANGELOG.md | 3 +++ lib/src/widgets/text_line.dart | 11 +++++------ pubspec.yaml | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2971f876..4da7c3c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# [7.0.4] +* Have text selection span full line height for uneven sized text. + # [7.0.3] * Fix ordered list numeration for lists with more than one level of list. diff --git a/lib/src/widgets/text_line.dart b/lib/src/widgets/text_line.dart index 2d743d3b..b7174a2f 100644 --- a/lib/src/widgets/text_line.dart +++ b/lib/src/widgets/text_line.dart @@ -1111,13 +1111,12 @@ class RenderEditableTextLine extends RenderEditableBox { // Paint a small rect at the start of empty lines that // are contained by the selection. if (line.isEmpty && - textSelection.baseOffset <= line.offset && - textSelection.extentOffset > line.offset - ) { + textSelection.baseOffset <= line.offset && + textSelection.extentOffset > line.offset) { final lineHeight = - preferredLineHeight(TextPosition(offset: line.offset)); - _selectedRects?.add( - TextBox.fromLTRBD(0, 0, 3, lineHeight, textDirection)); + preferredLineHeight(TextPosition(offset: line.offset)); + _selectedRects + ?.add(TextBox.fromLTRBD(0, 0, 3, lineHeight, textDirection)); } _paintSelection(context, effectiveOffset); diff --git a/pubspec.yaml b/pubspec.yaml index 60ce2a16..b4a3eb33 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us) -version: 7.0.3 +version: 7.0.4 #author: bulletjournal homepage: https://bulletjournal.us/home/index.html repository: https://github.com/singerdmx/flutter-quill