Skip to content

Commit

Permalink
Fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Jul 4, 2019
1 parent 2fc0d90 commit 67c1472
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions reader/src/main/java/org/jline/reader/impl/LineReaderImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -3838,26 +3838,26 @@ private AttributedString expandPromptPattern(String pattern, int padToWidth,
decode: while (true) {
ch = pattern.charAt(i++);
switch (ch) {
case '{':
case '}':
String str = sb.toString();
AttributedString astr;
if (!isHidden) {
astr = AttributedString.fromAnsi(str);
cols += astr.columnLength();
} else {
astr = new AttributedString(str, AttributedStyle.HIDDEN);
}
if (padPartIndex == parts.size()) {
padPartString = sb;
if (i < plen) {
sb = new StringBuilder();
}
} else {
sb.setLength(0);
}
parts.add(astr);
isHidden = ch == '{';
case '{':
case '}':
String str = sb.toString();
AttributedString astr;
if (!isHidden) {
astr = AttributedString.fromAnsi(str);
cols += astr.columnLength();
} else {
astr = new AttributedString(str, AttributedStyle.HIDDEN);
}
if (padPartIndex == parts.size()) {
padPartString = sb;
if (i < plen) {
sb = new StringBuilder();
}
} else {
sb.setLength(0);
}
parts.add(astr);
isHidden = ch == '{';
break decode;
case '%':
sb.append(ch);
Expand Down

0 comments on commit 67c1472

Please sign in to comment.