diff --git a/pom.xml b/pom.xml
index f8c6af67a..d0ab46f3c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -102,7 +102,7 @@
5.13.0
- 2.4.0
+ 2.4.1
1.0.3
2.9.2
5.1.0
diff --git a/terminal-jansi/src/main/java/org/jline/terminal/impl/jansi/win/JansiWinConsoleWriter.java b/terminal-jansi/src/main/java/org/jline/terminal/impl/jansi/win/JansiWinConsoleWriter.java
index 51bad1dcb..6a4811d05 100644
--- a/terminal-jansi/src/main/java/org/jline/terminal/impl/jansi/win/JansiWinConsoleWriter.java
+++ b/terminal-jansi/src/main/java/org/jline/terminal/impl/jansi/win/JansiWinConsoleWriter.java
@@ -10,7 +10,7 @@
import java.io.IOException;
-import org.fusesource.jansi.WindowsSupport;
+import org.fusesource.jansi.internal.Kernel32;
import org.jline.terminal.impl.AbstractWindowsConsoleWriter;
import static org.fusesource.jansi.internal.Kernel32.WriteConsoleW;
@@ -27,7 +27,7 @@ public JansiWinConsoleWriter(long console) {
@Override
protected void writeConsole(char[] text, int len) throws IOException {
if (WriteConsoleW(console, text, len, writtenChars, 0) == 0) {
- throw new IOException("Failed to write to console: " + WindowsSupport.getLastErrorMessage());
+ throw new IOException("Failed to write to console: " + Kernel32.getLastErrorMessage());
}
}
}
diff --git a/terminal-jansi/src/main/java/org/jline/terminal/impl/jansi/win/WindowsAnsiWriter.java b/terminal-jansi/src/main/java/org/jline/terminal/impl/jansi/win/WindowsAnsiWriter.java
index 5418f41a9..3e9155d23 100644
--- a/terminal-jansi/src/main/java/org/jline/terminal/impl/jansi/win/WindowsAnsiWriter.java
+++ b/terminal-jansi/src/main/java/org/jline/terminal/impl/jansi/win/WindowsAnsiWriter.java
@@ -11,8 +11,7 @@
import java.io.IOException;
import java.io.Writer;
-import org.fusesource.jansi.WindowsSupport;
-import org.fusesource.jansi.internal.Kernel32.*;
+import org.fusesource.jansi.internal.Kernel32;
import org.jline.utils.AnsiWriter;
import org.jline.utils.Colors;
@@ -82,7 +81,7 @@ public WindowsAnsiWriter(Writer out) throws IOException {
private void getConsoleInfo() throws IOException {
out.flush();
if (GetConsoleScreenBufferInfo(console, info) == 0) {
- throw new IOException("Could not get the screen info: " + WindowsSupport.getLastErrorMessage());
+ throw new IOException("Could not get the screen info: " + Kernel32.getLastErrorMessage());
}
if (negative) {
info.attributes = invertAttributeColors(info.attributes);
@@ -104,7 +103,7 @@ private void applyAttribute() throws IOException {
attributes = invertAttributeColors(attributes);
}
if (SetConsoleTextAttribute(console, attributes) == 0) {
- throw new IOException(WindowsSupport.getLastErrorMessage());
+ throw new IOException(Kernel32.getLastErrorMessage());
}
}
@@ -122,7 +121,7 @@ private void applyCursorPosition() throws IOException {
info.cursorPosition.x = (short) Math.max(0, Math.min(info.size.x - 1, info.cursorPosition.x));
info.cursorPosition.y = (short) Math.max(0, Math.min(info.size.y - 1, info.cursorPosition.y));
if (SetConsoleCursorPosition(console, info.cursorPosition.copy()) == 0) {
- throw new IOException(WindowsSupport.getLastErrorMessage());
+ throw new IOException(Kernel32.getLastErrorMessage());
}
}
@@ -360,7 +359,7 @@ protected void processInsertLine(int optionInt) throws IOException {
info.attributes = originalColors;
info.unicodeChar = ' ';
if (ScrollConsoleScreenBuffer(console, scroll, scroll, org, info) == 0) {
- throw new IOException(WindowsSupport.getLastErrorMessage());
+ throw new IOException(Kernel32.getLastErrorMessage());
}
}
@@ -376,7 +375,7 @@ protected void processDeleteLine(int optionInt) throws IOException {
info.attributes = originalColors;
info.unicodeChar = ' ';
if (ScrollConsoleScreenBuffer(console, scroll, scroll, org, info) == 0) {
- throw new IOException(WindowsSupport.getLastErrorMessage());
+ throw new IOException(Kernel32.getLastErrorMessage());
}
}