summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/acr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r--crawl-ref/source/acr.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 0f53e43075..ab1102eb24 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -1370,6 +1370,12 @@ static bool _cmd_is_repeatable(command_type cmd, bool is_again = false)
// Used to determine whether to apply the berserk penalty at end of round.
bool apply_berserk_penalty = false;
+static void _center_cursor()
+{
+ const coord_def cwhere = grid2view(you.pos());
+ cgotoxy(cwhere.x, cwhere.y);
+}
+
//
// This function handles the player's input. It's called from main(),
// from inside an endless loop.
@@ -1473,8 +1479,7 @@ static void _input()
handle_delay();
- const coord_def cwhere = grid2view(you.pos());
- cgotoxy(cwhere.x, cwhere.y);
+ _center_cursor();
if (you_are_delayed())
{
@@ -3369,6 +3374,8 @@ static void _check_messages()
{
_announce_messages();
update_message_status();
+ // Recenter the cursor on the player.
+ _center_cursor();
}
}
#endif