From dce7443f6e1b4dfdd60e75660625e7e2a7f1a31d Mon Sep 17 00:00:00 2001 From: mattirn Date: Fri, 7 Jun 2024 08:26:06 +0200 Subject: [PATCH] Cursor badly positioned after creating Status bar, fixes #977 (#978) --- terminal/src/main/java/org/jline/utils/Status.java | 1 + 1 file changed, 1 insertion(+) diff --git a/terminal/src/main/java/org/jline/utils/Status.java b/terminal/src/main/java/org/jline/utils/Status.java index c42b50d7e..7acc6dbb3 100644 --- a/terminal/src/main/java/org/jline/utils/Status.java +++ b/terminal/src/main/java/org/jline/utils/Status.java @@ -147,6 +147,7 @@ public void update(List lines, boolean flush) { if (newScrollRegion < scrollRegion) { // We need to scroll up to grow the status bar terminal.puts(Capability.save_cursor); + terminal.puts(Capability.cursor_address, scrollRegion, 0); for (int i = newScrollRegion; i < scrollRegion; i++) { terminal.puts(Capability.cursor_down); }