diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2021-12-10 16:14:10 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-12-13 23:37:32 +0100 |
commit | 2d045825e09117c13510b90481b4b2fd1471318a (patch) | |
tree | 786287c3324d4de1e31c003646b7b3b607d3289d /commands/edit.c | |
parent | c3ba87523ecb19e673f9e69915df8cf62129a73d (diff) | |
download | barebox-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/edit.c')
-rw-r--r-- | commands/edit.c | 4 |
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 */ |