[Toybox] [PATCH] ps, vi: fix flicker.
enh
enh at google.com
Thu Feb 23 12:41:41 PST 2023
My earlier trick to ensure that we buffer whole screens full works fine
on glibc, but both bionic and musl have a tiny 1024-byte BUFSIZ that
makes it unsuitable for this kind of use, even on laptop screens.
Explicitly say 8192, since 4096 is slightly too small for my larger
laptop's screen (and I don't use a particularly small font).
At some point we should probably move this into tty.c, dynamically
allocate based on screen size (plus space for escape sequences/non-ASCII
characters), and track SIGWINCH in case the window grows. But this stops
top and vi flickering today, which is good enough for now. (Amusingly, I
hit the vi problem -- which is actually much worse, for dense strace
output -- while debugging the top problem, while debugging the ps
problem, while debugging the thing I was actually supposed to be doing
_yesterday_. So definitely time to back out of a few rat holes!)
---
toys/pending/vi.c | 2 +-
toys/posix/ps.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20230223/75e89be2/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ps-vi-fix-flicker.patch
Type: text/x-patch
Size: 1922 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20230223/75e89be2/attachment.bin>
More information about the Toybox
mailing list