From 0f6282595fbd36e53f25e42ab451a582818171b8 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Thu, 2 Sep 2010 09:00:35 +0100 Subject: [PATCH] Change order of return values from getyx - fixes display of historical CPU. In this commit: http://cvs.savannah.gnu.org/viewvc/ocaml-tmk/functions.c?root=ocaml-tmk&r1=1.2&r2=1.3 Sam changed (fixed) the order that the coordinates are returned from the ncurses 'getyx' call. Since this commit was made 3 years ago it should be safe to assume everyone is using the new ocaml-ncurses by now. This meant the historical %CPU was being displayed off the bottom of the screen instead of on the top row at the right. Now it is displayed in the correct place. --- virt-top/virt_top.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt-top/virt_top.ml b/virt-top/virt_top.ml index 36b7e17..3990b55 100644 --- a/virt-top/virt_top.ml +++ b/virt-top/virt_top.ml @@ -1174,7 +1174,7 @@ let redraw = (* Display historical CPU time. *) let () = - let x, y = historical_cursor in (* Yes, it's a bug in ocaml-curses *) + let y, x = historical_cursor in let maxwidth = cols - x in let line = String.concat " " -- 1.8.3.1