
--
You received this message because you are subscribed to the Google Groups "jline-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jline-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
>Â I think the clearscreen will only erase the visible area and not the full window.
Yikes, I usually have a buffer size of 5,000 lines in my console just so I can scroll back really far. That's a lot of lines not getting cleared!
> It may be interesting if you could test with the following instead:I can give it a try. I'm curious how many Windows users there are using Jline-powered projects. Some of this stuff is a little surprising to be yet-uncovered. Â

> They are not supposed to be visible. I'm not sure why in your case they end up showing again.Well, it makes sense if the clear screen moves the cursor back to the first line of the terminal. After I add enough lines to scroll down, I'm going past lines I've already been past before and if they're not getting cleared, then it makes sense that I'd see what's still on them!
> I think it should move the cursor to the first visible line, not to the real first line. ÂDoes it really matter though if it's the very first line or just the first visible line? If there's not-visible lines below the current viewport that have text still on them, they're still going to come into view as soon as I add enough lines to the current screen to start scrolling down again. Unless you're saying that the lines "below" the current viewport would somehow always be empty.
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 c3f0196..37fe9fd 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
@@ -241,7 +241,7 @@ public final class WindowsAnsiWriter extends AnsiWriter {
   @Override
   protected void processCursorTo(int row, int col) throws IOException {
     getConsoleInfo();
-Â Â Â Â info.cursorPosition.y = (short) (row - 1);
+Â Â Â Â info.cursorPosition.y = (short) (info.window.top + row - 1);
     info.cursorPosition.x = (short) (col - 1);
     applyCursorPosition();
   }
diff --git a/terminal-jna/src/main/java/org/jline/terminal/impl/jna/win/WindowsAnsiWriter.java b/terminal-jna/src/main/java/org/jline/terminal/impl/jna/win/WindowsAnsiWriter.java
index 0ce3c06..383b45f 100644
--- a/terminal-jna/src/main/java/org/jline/terminal/impl/jna/win/WindowsAnsiWriter.java
+++ b/terminal-jna/src/main/java/org/jline/terminal/impl/jna/win/WindowsAnsiWriter.java
@@ -231,7 +231,7 @@ public final class WindowsAnsiWriter extends AnsiWriter {
Â
   protected void processCursorTo(int row, int col) throws IOException {
     getConsoleInfo();
-Â Â Â Â info.dwCursorPosition.Y = (short) (row - 1);
+Â Â Â Â info.dwCursorPosition.Y = (short) (info.srWindow.Top + row - 1);
     info.dwCursorPosition.X = (short) (col - 1);
     applyCursorPosition();
   }
Guillaume
To unsubscribe from this group and stop receiving emails from it, send an email to jline-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "jline-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jline-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "jline-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jline-users...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "jline-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jline-users...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "jline-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jline-users...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "jline-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jline-users...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "jline-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jline-users...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "jline-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jline-users...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "jline-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jline-users...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "jline-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jline-users...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "jline-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jline-users...@googlegroups.com.