"\e[2;<x>r" is needed to prevent the status line from scrolling out of
the window when smartscrolling is used. Only send it when smartscrolling
is actually active.

Signed-off-by: Sascha Hauer <s.ha...@pengutronix.de>
---
 commands/edit.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/commands/edit.c b/commands/edit.c
index 592cf4aa3d..12695d39e4 100644
--- a/commands/edit.c
+++ b/commands/edit.c
@@ -610,7 +610,9 @@ static int do_edit(int argc, char *argv[])
                                argv[1]);
        }
 
-       printf("\x1b[2;%dr", screenheight);
+       if (smartscroll)
+               printf("\x1b[2;%dr", screenheight);
+
        pos(0, 0);
 
        screenheight--; /* status line */
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to