From c570a5d19ebc0ea5b3cebb616b2cb6af705e8a97 Mon Sep 17 00:00:00 2001 From: henrypp Date: Sun, 26 Jan 2025 18:59:24 +0500 Subject: [PATCH] fix incorrect returned index #1945 --- src/listview.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/listview.c b/src/listview.c index d9470dac..dd28f3f6 100644 --- a/src/listview.c +++ b/src/listview.c @@ -11,8 +11,13 @@ PITEM_TAB_CONTEXT _app_listview_getcontext ( PITEM_TAB_CONTEXT context; if (tab_id == INT_ERROR) + { tab_id = _r_tab_getcurrentitem (hwnd, IDC_TAB); + if (tab_id == INT_ERROR) + tab_id = 0; + } + context = (PITEM_TAB_CONTEXT)_r_tab_getitemlparam (hwnd, IDC_TAB, tab_id); return context;