Skip to content

Commit 3825269

Browse files
[!] Fixed the bug that the terminal reader could not initialize on Android.
1 parent 9b935a1 commit 3825269

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

src/main/java/org/angellock/impl/win32terminal/AnsiEscapes.java

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,20 @@ public static void enableAnsiSupport() {
7070
.encoding(StandardCharsets.UTF_8)
7171
.build();
7272

73-
reader = LineReaderBuilder.builder()
74-
.terminal(AnsiEscapes.getTerminal())
75-
.parser(new DefaultParser())
76-
.completer(new SystemTabCompleter())
77-
//.option(LineReader.Option.CASE_INSENSITIVE, true)
78-
.option(LineReader.Option.AUTO_LIST, true) // Automatically list options
79-
.option(LineReader.Option.LIST_PACKED, true) // Display completions in a compact form
80-
.option(LineReader.Option.AUTO_MENU, true) // Show menu automatically
81-
.option(LineReader.Option.MENU_COMPLETE, true)
82-
.variable(LineReader.SECONDARY_PROMPT_PATTERN, "%M> ")
83-
.build();
84-
8573
} catch (IOException e) {
8674
System.out.println("Could not enable ansi escapes: " + e.getMessage());
8775
}
76+
reader = LineReaderBuilder.builder()
77+
.terminal(AnsiEscapes.getTerminal())
78+
.parser(new DefaultParser())
79+
.completer(new SystemTabCompleter())
80+
//.option(LineReader.Option.CASE_INSENSITIVE, true)
81+
.option(LineReader.Option.AUTO_LIST, true) // Automatically list options
82+
.option(LineReader.Option.LIST_PACKED, true) // Display completions in a compact form
83+
.option(LineReader.Option.AUTO_MENU, true) // Show menu automatically
84+
.option(LineReader.Option.MENU_COMPLETE, true)
85+
.variable(LineReader.SECONDARY_PROMPT_PATTERN, "%M> ")
86+
.build();
8887
}
8988

9089
public static void printArt(String ARCHIVE_VERSION) {

0 commit comments

Comments
 (0)