From 14b434cb88d192a4a5cb2306115dec28cc69e714 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Wed, 7 Dec 2022 00:17:08 +0000 Subject: [PATCH] guess: Move the cursor to the first peg position after a guess It's annoying having to move it to the left each time. I suppose I could enter the second guess in reverse order, but then I'd need to move the cursor all the way to the right to submit it, which is just as bad. --- guess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guess.c b/guess.c index ba04a9e..793c815 100644 --- a/guess.c +++ b/guess.c @@ -507,7 +507,7 @@ static void game_changed_state(game_ui *ui, const game_state *oldstate, ui->markable = is_markable(&newstate->params, ui->curr_pegs); /* Clean up cursor position */ if (!ui->markable && ui->peg_cur == newstate->solution->npegs) - ui->peg_cur--; + ui->peg_cur = 0; } #define PEGSZ (ds->pegsz)