diff options
| author | Simon Tatham <anakin@pobox.com> | 2019-02-10 14:05:30 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2019-02-10 14:05:30 +0000 |
| commit | 1ba4e37228e6eae0d09c0cca7f4ab7fb489fdc9d (patch) | |
| tree | 1aa7367bfb5226832c8f4b6f1132ea726aad9cbb /pegs.c | |
| parent | d7c873313e4e80f928377b5be8c6602b22154324 (diff) | |
| download | puzzles-1ba4e37228e6eae0d09c0cca7f4ab7fb489fdc9d.zip puzzles-1ba4e37228e6eae0d09c0cca7f4ab7fb489fdc9d.tar.gz puzzles-1ba4e37228e6eae0d09c0cca7f4ab7fb489fdc9d.tar.bz2 puzzles-1ba4e37228e6eae0d09c0cca7f4ab7fb489fdc9d.tar.xz | |
Pegs: clear ui->cur_jumping on undo or redo.
Fixes an assertion failure in which you move the keyboard cursor to a
peg, press Enter to indicate that you're about to jump it to
somewhere, and then instead execute an undo or redo action which
replaces the peg with a hole. Thanks to Vitaly Ostrosablin for the
report.
Diffstat (limited to 'pegs.c')
| -rw-r--r-- | pegs.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -792,6 +792,12 @@ static void game_changed_state(game_ui *ui, const game_state *oldstate, * unoccupied. */ ui->dragging = false; + + /* + * Also, cancel a keyboard-driven jump if one is half way to being + * input. + */ + ui->cur_jumping = false; } #define PREFERRED_TILE_SIZE 33 |