PIVOT-1005: Fix the deletion of paragraph terminator simply by checking if remove
count is <= 1. This fixes the basic issue that you can't delete the terminator, but
there are still other problems that need fixing.
git-svn-id: https://svn.apache.org/repos/asf/pivot/trunk@1808126 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/wtk/src/org/apache/pivot/wtk/TextPane.java b/wtk/src/org/apache/pivot/wtk/TextPane.java
index aab1903..095957d 100644
--- a/wtk/src/org/apache/pivot/wtk/TextPane.java
+++ b/wtk/src/org/apache/pivot/wtk/TextPane.java
@@ -615,7 +615,7 @@
Node descendant = document.getDescendantAt(offset);
// Used to be: if (selectionLength == 0 && ...
- if (characterCount == 0 && descendant instanceof Paragraph) {
+ if (characterCount <= 1 && descendant instanceof Paragraph) {
// We are deleting a paragraph terminator
Paragraph paragraph = (Paragraph) descendant;