Skip to content

Commit

Permalink
Fix DiffHelper.diff logic for comparing strings of "hidden" character.
Browse files Browse the repository at this point in the history
  • Loading branch information
PerBothner committed Dec 4, 2017
1 parent 4b9e3e7 commit 9b453cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions terminal/src/main/java/org/jline/utils/DiffHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ public static List<Diff> diff(AttributedString text1, AttributedString text2) {
commonStart++;
}
if (startHiddenRange >= 0
&& (commonStart == l1 || ! text1.isHidden(commonStart))
&& (commonStart == l2 || ! text2.isHidden(commonStart)))
&& ((l1 > commonStart && text1.isHidden(commonStart))
|| (l2 > commonStart && text2.isHidden(commonStart))))
commonStart = startHiddenRange;

startHiddenRange = -1;
Expand Down

0 comments on commit 9b453cc

Please sign in to comment.