Skip to content

Commit

Permalink
Fix regression where -more- prompt overwrites part of message
Browse files Browse the repository at this point in the history
Introduced by d581dcade0d0ece98a72dc1adc7e2bf524f8a475 .  Should resolve case pointed out by agoodman00 in angband/angband#5998 where -more- is not preceded by a space.
  • Loading branch information
backwardsEric authored and NickMcConnell committed Jul 17, 2024
1 parent 5906ac7 commit 5d086ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ui-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ void display_message(game_event_type unused, game_event_data *data, void *user)

/* Find the rightmost split point */
for (check = MAX(w / 2 - message_column, 0);
check < w - 8; check++) {
check < w - 8 - message_column; check++) {
if (t[check] == ' ') split = check;
}

Expand All @@ -538,7 +538,7 @@ void display_message(game_event_type unused, game_event_data *data, void *user)
Term_putstr(message_column, 0, split, color, t);

/* Flush it */
msg_flush(split + 1);
msg_flush(message_column + split + 1);

/* Restore the split character */
t[split] = oops;
Expand Down

0 comments on commit 5d086ce

Please sign in to comment.