aboutsummaryrefslogtreecommitdiff
path: root/pearl.c
diff options
context:
space:
mode:
authorJonas Kölker <jonaskoelker@yahoo.com>2015-09-22 11:41:41 +0200
committerSimon Tatham <anakin@pobox.com>2015-10-03 16:59:10 +0100
commitea8da331e361c96a7e563b0a91dc3535e0d1d545 (patch)
tree035e6d28f96ebae1b9da299dd69fb38d42c46b93 /pearl.c
parentbf8ff09a84c129f0e3e66e18df61912871d4b6e3 (diff)
downloadpuzzles-ea8da331e361c96a7e563b0a91dc3535e0d1d545.zip
puzzles-ea8da331e361c96a7e563b0a91dc3535e0d1d545.tar.gz
puzzles-ea8da331e361c96a7e563b0a91dc3535e0d1d545.tar.bz2
puzzles-ea8da331e361c96a7e563b0a91dc3535e0d1d545.tar.xz
Cancel dragging in Pearl by pressing Escape or Backspace.
Diffstat (limited to 'pearl.c')
-rw-r--r--pearl.c5
1 files changed, 5 insertions, 0 deletions
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. */