aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Nevins <jacobn@chiark.greenend.org.uk>2013-03-10 12:28:13 +0000
committerJacob Nevins <jacobn@chiark.greenend.org.uk>2013-03-10 12:28:13 +0000
commit0d62b4a688bb105fa951d0d7c309a055eeb35893 (patch)
tree72c8e71ae47f351c1d28b64d705786227f9b85d9
parent4a1669b9add42308bde1dc9dfe3a3b915563679e (diff)
downloadpuzzles-0d62b4a688bb105fa951d0d7c309a055eeb35893.zip
puzzles-0d62b4a688bb105fa951d0d7c309a055eeb35893.tar.gz
puzzles-0d62b4a688bb105fa951d0d7c309a055eeb35893.tar.bz2
puzzles-0d62b4a688bb105fa951d0d7c309a055eeb35893.tar.xz
Fix entering pencil marks from the keyboard; the cursor is no longer removed
(this brings Undead into line with Solo, etc). [originally from svn r9769]
-rw-r--r--undead.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/undead.c b/undead.c
index 0e687b9..1e0bbc4 100644
--- a/undead.c
+++ b/undead.c
@@ -1713,24 +1713,23 @@ static char *interpret_move(game_state *state, game_ui *ui,
if (xi >= 0 && !state->common->fixed[xi]) {
if (button == 'g' || button == 'G' || button == '1') {
sprintf(buf,"g%d",xi);
- ui->hpencil = ui->hshow = 0;
+ if (!ui->hcursor) ui->hpencil = ui->hshow = 0;
return dupstr(buf);
}
if (button == 'v' || button == 'V' || button == '2') {
sprintf(buf,"v%d",xi);
- ui->hpencil = ui->hshow = 0;
+ if (!ui->hcursor) ui->hpencil = ui->hshow = 0;
return dupstr(buf);
}
if (button == 'z' || button == 'Z' || button == '3') {
sprintf(buf,"z%d",xi);
- ui->hpencil = ui->hshow = 0;
+ if (!ui->hcursor) ui->hpencil = ui->hshow = 0;
return dupstr(buf);
}
if (button == 'e' || button == 'E' || button == CURSOR_SELECT2 ||
button == '0' || button == '\b') {
- if (!ui->hcursor) ui->hshow = 0;
sprintf(buf,"E%d",xi);
- ui->hpencil = ui->hshow = 0;
+ if (!ui->hcursor) ui->hpencil = ui->hshow = 0;
return dupstr(buf);
}
}
@@ -2597,4 +2596,3 @@ const struct game thegame = {
FALSE, game_timing_state,
0, /* flags */
};
-