[PATCH 22/25] edit: send escape sequence only for smartscroll

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"\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.hauer@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux