Skip to content

Commit

Permalink
Fixed console input preview not showing up
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphiMC committed Nov 2, 2023
1 parent e2c7122 commit 368e86d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 99 deletions.
9 changes: 4 additions & 5 deletions src/main/java/net/raphimc/viaproxy/cli/ConsoleHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@
import net.raphimc.viaproxy.util.ArrayHelper;
import net.raphimc.viaproxy.util.logging.Logger;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;

public class ConsoleHandler {

Expand All @@ -43,10 +42,10 @@ public static void hookConsole() {
}

private static void listen() {
final BufferedReader reader = new BufferedReader(new InputStreamReader(new DelayedStream(System.in, 500)));
final Scanner scanner = new Scanner(System.in);
try {
String line;
while ((line = reader.readLine()) != null) {
while (scanner.hasNextLine()) {
final String line = scanner.nextLine();
try {
final String[] parts = line.split(" ");
if (parts.length == 0) continue;
Expand Down
94 changes: 0 additions & 94 deletions src/main/java/net/raphimc/viaproxy/cli/DelayedStream.java

This file was deleted.

0 comments on commit 368e86d

Please sign in to comment.