aboutsummaryrefslogtreecommitdiff
path: root/map.c
diff options
context:
space:
mode:
authorKirill Petrashin <kirill8201@yandex.ru>2026-04-24 15:49:02 +0300
committerKirill Petrashin <kirill8201@yandex.ru>2026-04-24 15:49:02 +0300
commitc75402d182e9ab1b8af846af9f7348c9431b5e66 (patch)
tree87ee75bd8694da07f5179a2ab66946a705698f55 /map.c
parentb4b83c53db8b79a2141ef43ce9d3567f482462ee (diff)
downloadastar-c75402d182e9ab1b8af846af9f7348c9431b5e66.tar.xz
Avoid printing a newline when enabling/disabling mouse movement reporting
Diffstat (limited to 'map.c')
-rw-r--r--map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/map.c b/map.c
index 11f9eb6..5940d02 100644
--- a/map.c
+++ b/map.c
@@ -632,7 +632,7 @@ void map_editor(Map *map, size_t *width, size_t *height, Position *start, Positi
mmask_t oldmask;
mousemask(ALL_MOUSE_EVENTS | REPORT_MOUSE_POSITION, &oldmask);
mouseinterval(0);
- printf("\033[?1003h\n"); /* Makes the terminal report mouse movements */
+ printf("\033[?1003h"); fflush(stdout); /* Makes the terminal report mouse movements */
char m1down = 0;
MapTile cur = EMPTY;
@@ -928,7 +928,7 @@ void map_editor(Map *map, size_t *width, size_t *height, Position *start, Positi
}
mousemask(oldmask, NULL);
- printf("\033[?1003l\n"); /* Makes the terminal NOT report mouse movements */
+ printf("\033[?1003l"); fflush(stdout); /* Makes the terminal NOT report mouse movements */
}
void map_copy(Map src, size_t src_w, size_t src_h, Map dest, size_t dest_w, size_t dest_h) {