Code

src/oping.c: Switch graphs when pressing "g".
authorFlorian Forster <ff@octo.it>
Wed, 19 Nov 2014 17:08:14 +0000 (18:08 +0100)
committerFlorian Forster <ff@octo.it>
Wed, 19 Nov 2014 17:08:14 +0000 (18:08 +0100)
src/oping.c

index cce437904d856ff01571b1ffede9c41362a33f84..79afb5f55a47f8a32f3d0c0f50e9d9eee59f3121 100644 (file)
@@ -1268,6 +1268,13 @@ static int check_resize (pingobj_t *ping) /* {{{ */
                        break;
                else if (key == KEY_RESIZE)
                        need_resize = 1;
                        break;
                else if (key == KEY_RESIZE)
                        need_resize = 1;
+               else if (key == 'g')
+               {
+                       if (opt_show_graph == 3)
+                               opt_show_graph = 1;
+                       else if (opt_show_graph > 0)
+                               opt_show_graph++;
+               }
        }
 
        if (need_resize)
        }
 
        if (need_resize)