Skip to content

Commit

Permalink
Chore: dart format and removed unnecessary validation of localOffset …
Browse files Browse the repository at this point in the history
…for cursorPlaceholderConfig.offset in paint method
  • Loading branch information
CatHood0 committed Nov 28, 2024
1 parent 6bb3a13 commit 057b8bd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/src/common/extensions/nodes_ext.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../../document/nodes/node.dart';

extension NodesCheckingExtension on Node {
bool isNodeInline(){
bool isNodeInline() {
for (final attr in style.attributes.values) {
if (!attr.isInline) return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class PlaceholderConfig {
}
}


/// Represents the text that will be displayed
@immutable
class PlaceholderTextBuilder {
Expand Down
3 changes: 1 addition & 2 deletions lib/src/editor/widgets/cursor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,7 @@ class CursorPainter {
cursorPlaceholderConfig.show &&
cursorPlaceholderConfig.text.trim().isNotEmpty) {
if (isNodeValid) {
final localOffset = cursorPlaceholderConfig.offset;
if (localOffset == null) return;
final localOffset = cursorPlaceholderConfig.offset ?? const Offset(0, 0);
placeholderPainter ??= TextPainter(
text: TextSpan(
text: cursorPlaceholderConfig.text,
Expand Down

0 comments on commit 057b8bd

Please sign in to comment.