summaryrefslogtreecommitdiff
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2021-12-10 16:14:10 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2021-12-13 23:37:32 +0100
commit2d045825e09117c13510b90481b4b2fd1471318a (patch)
tree786287c3324d4de1e31c003646b7b3b607d3289d /commands
parentc3ba87523ecb19e673f9e69915df8cf62129a73d (diff)
downloadbarebox-2d045825e09117c13510b90481b4b2fd1471318a.tar.gz
edit: send escape sequence only for smartscroll
"\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@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r--commands/edit.c4
1 files changed, 3 insertions, 1 deletions
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 */