aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Petrashin <kirill8201@yandex.ru>2026-04-18 22:00:43 +0300
committerKirill Petrashin <kirill8201@yandex.ru>2026-04-18 22:00:43 +0300
commit3e521156d8abeb46af3cd4893adf08d7e4513280 (patch)
tree7d41ff9882ab20f101ac36f87c5ce835cebc3a9b
parent7307751d7c15681100fac1daadaeaf87cbb25cb6 (diff)
downloadastar-3e521156d8abeb46af3cd4893adf08d7e4513280.tar.xz
Make map_editor() return the mouesmask back to normal
-rw-r--r--map.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/map.c b/map.c
index ff1ab7d..1f36626 100644
--- a/map.c
+++ b/map.c
@@ -515,7 +515,8 @@ void map_editor(Map *map, size_t *width, size_t *height, Position *start, Positi
print_message(*height);
MEVENT event;
- mousemask(ALL_MOUSE_EVENTS | REPORT_MOUSE_POSITION, NULL);
+ mmask_t oldmask;
+ mousemask(ALL_MOUSE_EVENTS | REPORT_MOUSE_POSITION, &oldmask);
mouseinterval(0);
printf("\033[?1003h\n"); /* Makes the terminal report mouse movements */
@@ -754,6 +755,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 */
}