From e540b13a5d2810fea5ba3b9ab7475a2ec7d01d27 Mon Sep 17 00:00:00 2001 From: Grigory Ustinov Date: Fri, 9 Feb 2018 15:43:05 +0300 Subject: [PATCH 1/2] Add possibility of selecting full stack by shift+M --- src/keyboard.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/keyboard.c b/src/keyboard.c index f5928d2..097f3ef 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -95,6 +95,18 @@ static void handle_card_movement(struct cursor *cursor) { } } break; + case 'M': + if (origin == cursor_stack(cursor) && maneuvre_stack(*origin)) { + for (struct stack *i = *origin; i && i->next; i = i->next) { + while (i->next->card->face == EXPOSED && + (i->card->frame->begin_y - i->next->card->frame->begin_y) > 1) { + erase_stack(*origin); + card_mark(i->next->card); + draw_stack(*origin); + } + } + } + break; case 'n': if (origin == cursor_stack(cursor) && maneuvre_stack(*origin)) { for (struct stack *i = (*origin)->next; i; i = i->next) { From 464615fdaa148cdb2e70e4acc7e4881ab41d7e45 Mon Sep 17 00:00:00 2001 From: Grigory Ustinov Date: Fri, 9 Feb 2018 16:21:29 +0300 Subject: [PATCH 2/2] Add possibility of deselecting full stack by shift+N --- src/keyboard.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/keyboard.c b/src/keyboard.c index 097f3ef..5b2d45e 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -128,6 +128,15 @@ static void handle_card_movement(struct cursor *cursor) { } } break; + case 'N': + if (origin == cursor_stack(cursor) && maneuvre_stack(*origin)) { + erase_stack(*origin); + unmark_cards(*origin); + card_mark((*origin)->card); + draw_stack(*origin); + } + break; + case KEY_SPACEBAR:; /* http://www.mail-archive.com/gcc-bugs@gcc.gnu.org/msg259382.html */ struct stack **destination = cursor_stack(cursor);