From a7e326a5e8f3539815528b1de785980ec3a9b4d0 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 3 May 2016 11:36:16 +0200 Subject: feh_draw_filename: Set correct list number in multiwindow mode (closes #237) --- src/imlib.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/imlib.c') diff --git a/src/imlib.c b/src/imlib.c index e6e5b5c..d497311 100644 --- a/src/imlib.c +++ b/src/imlib.c @@ -601,8 +601,12 @@ void feh_draw_filename(winwidget w) len = snprintf(NULL, 0, "%d of %d", gib_list_length(filelist), gib_list_length(filelist)) + 1; s = emalloc(len); - snprintf(s, len, "%d of %d", gib_list_num(filelist, current_file) + - 1, gib_list_length(filelist)); + if (w->file) + snprintf(s, len, "%d of %d", gib_list_num(filelist, w->file) + + 1, gib_list_length(filelist)); + else + snprintf(s, len, "%d of %d", gib_list_num(filelist, current_file) + + 1, gib_list_length(filelist)); gib_imlib_get_text_size(fn, s, NULL, &nw, NULL, IMLIB_TEXT_TO_RIGHT); -- cgit v1.2.3