Skip to content

Commit

Permalink
remove table decoration from previous paragraph (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
jperedadnr authored Aug 2, 2023
1 parent 6f13f4f commit 24c0927
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,12 @@ public ParagraphDecoration getParagraphDecorationAtCaret(int caretPosition) {
}
textPosition += piece.length;
}
return previousPieceParagraphDecoration(index);
ParagraphDecoration prevDecoration = previousPieceParagraphDecoration(index);
if (prevDecoration.hasTableDecoration()) {
// remove table decoration from the previous paragraph
return ParagraphDecoration.builder().fromDecoration(prevDecoration).tableDecoration(new TableDecoration()).build();
}
return prevDecoration;
}

@Override
Expand Down

0 comments on commit 24c0927

Please sign in to comment.