From ea8da331e361c96a7e563b0a91dc3535e0d1d545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20K=C3=B6lker?= Date: Tue, 22 Sep 2015 11:41:41 +0200 Subject: Cancel dragging in Pearl by pressing Escape or Backspace. --- pearl.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pearl.c') diff --git a/pearl.c b/pearl.c index 43afcd6..977577f 100644 --- a/pearl.c +++ b/pearl.c @@ -2058,6 +2058,11 @@ static char *interpret_move(const game_state *state, game_ui *ui, } } + if (button == 27 || button == '\b') { + ui->ndragcoords = -1; + return ""; + } + if (release) { if (ui->ndragcoords > 0) { /* End of a drag: process the cached line data. */ -- cgit v1.1