If the user scrolled to 1% of the page there was 0% shown and with 50G vimb
browser showed 49% in status bar. This patch adapts the rounding of the values
in the status bar so that they fit to the done scrolling.
*/
#include <sys/stat.h>
+#include <math.h>
#include "main.h"
#include "util.h"
#include "command.h"
/* show the scroll status */
max = gtk_adjustment_get_upper(vb.gui.adjust_v) - gtk_adjustment_get_page_size(vb.gui.adjust_v);
- val = (int)(gtk_adjustment_get_value(vb.gui.adjust_v) / max * 100);
+ val = (int)floor(0.5 + (gtk_adjustment_get_value(vb.gui.adjust_v) / max * 100));
if (max == 0) {
g_string_append(status, " All");