[Toybox] [PATCH] top: support Enter as a synonym for Space.

enh enh at google.com
Wed Feb 13 15:30:40 PST 2019


Both refresh the display in the traditional implementation.
---
 toys/posix/ps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toys/posix/ps.c b/toys/posix/ps.c
index 926132c4..faddf685 100644
--- a/toys/posix/ps.c
+++ b/toys/posix/ps.c
@@ -1679,7 +1679,7 @@ static void top_common(

       // Flush unknown escape sequences.
       if (i==27) while (0<scan_key_getsize(scratch, 0, &TT.width, &TT.height));
-      else if (i==' ') {
+      else if (i=='\r' || i==' ') {
         timeout = 0;
         break;
       } else if (toupper(i)=='R')
-- 
2.20.1.791.gb4d0f1c61a-goog
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-top-support-Enter-as-a-synonym-for-Space.patch
Type: text/x-patch
Size: 807 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20190213/568a356e/attachment-0002.bin>


More information about the Toybox mailing list