From f5c3e83886891c659953c849f28e89628844011f Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Mon, 28 Oct 2019 15:19:59 -0300 Subject: [PATCH] Fixing issue with "selection" actions. --- src/selection/selection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/selection/selection.c b/src/selection/selection.c index 87eccbe..1771f09 100644 --- a/src/selection/selection.c +++ b/src/selection/selection.c @@ -193,10 +193,10 @@ void do_select(H3270 *hSession, unsigned int start, unsigned int end, unsigned i { hSession->selected = 1; hSession->cbk.set_selection(hSession,1); + lib3270_notify_actions(hSession,LIB3270_ACTION_GROUP_SELECTION); } hSession->cbk.update_selection(hSession,start,end); - lib3270_notify_actions(hSession,LIB3270_ACTION_GROUP_SELECTION); } @@ -397,7 +397,7 @@ LIB3270_EXPORT int lib3270_has_selection(const H3270 *hSession) if(check_online_session(hSession)) return 0; - return hSession->selected; + return hSession->selected ? 1 : 0; } LIB3270_EXPORT int lib3270_get_selection_rectangle(H3270 *hSession, unsigned int *row, unsigned int *col, unsigned int *width, unsigned int *height) -- libgit2 0.21.2