X11: handle Shift+clicks in the list

This commit is contained in:
Přemysl Eric Janouch 2022-08-25 00:25:03 +02:00
parent 2d219f1a4b
commit d82be07807
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 7 additions and 0 deletions

View File

@ -2770,6 +2770,13 @@ app_process_left_mouse_click (struct widget *w, int x, int y, int modifiers)
|| row_index >= (int) tab->item_count - tab->item_top)
return false;
if (!(modifiers & TERMO_KEYMOD_SHIFT))
tab->item_mark = -1;
else if (!tab->can_multiselect || tab->item_selected < 0)
return false;
else if (tab->item_mark < 0)
tab->item_mark = tab->item_selected;
// TODO: Probably will need to fix up item->top
// for partially visible items in X11.
tab->item_selected = row_index + tab->item_top;