diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-08-03 07:06:59 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-08-03 07:06:59 -0700 |
commit | 8534e9e277723a48cff9f791253a856506e72aa1 (patch) | |
tree | 12d1a243fc0c0193d5de0aa48754ad2c43a70e26 /pw.c | |
parent | 60ef2a41f547fb5b0a3cfd553f65cfbd700b3da6 (diff) | |
download | pw-8534e9e277723a48cff9f791253a856506e72aa1.tar.gz pw-8534e9e277723a48cff9f791253a856506e72aa1.tar.bz2 pw-8534e9e277723a48cff9f791253a856506e72aa1.zip |
ui fix: don't clear to end of screen.
* pw.c (clrline): use the [K sequence rather than
the [J sequence so that we only clear this line, not to the
rest of the screen. Clearing the rest of the screen trashes
any scroll-protected status lines the user may have set up.
Vim respects this, for instance. I have a setup like that now
and noticed the issue that when I run pw, my status stuff
disappears.
Diffstat (limited to 'pw.c')
-rw-r--r-- | pw.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -390,7 +390,7 @@ static int grexec(grep *gr, const char *line) static void clrline(unsigned stat) { if ((stat & stat_bkgnd) == 0) - printf("\r\033[J"); + printf("\r\033[K"); } static void clreol(int nl) |