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