summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-05 22:58:57 -0400
committerpommicket <pommicket@gmail.com>2023-08-05 22:58:57 -0400
commit518851c0cde788a807e640377a7093ab4e8c5b5f (patch)
treee18c5296d7b5b5450689402f65be1bd91d89845d /main.c
parent913a5a5dfbcf6789a1ac6b8c32fb23cdcdde995b (diff)
more dynamic menus (menus are currently broken)
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main.c b/main.c
index 55fb94a..6e3f46b 100644
--- a/main.c
+++ b/main.c
@@ -683,7 +683,7 @@ int main(int argc, char **argv) {
// we need to do this here, and not in buffer_render, because ctrl+click (go to definition)
// could switch to a different buffer.
// line buffer click handling, IS done in buffer_render (yes this is less than ideal)
- if (!ted->menu) {
+ if (!menu_is_any_open(ted)) {
for (u32 i = 0; i < TED_MAX_NODES; ++i) {
if (ted->nodes_used[i]) {
Node *node = &ted->nodes[i];
@@ -864,7 +864,7 @@ int main(int argc, char **argv) {
buffer_scroll(active_buffer, +scroll_amount_x, 0);
}
- if (ted->menu) {
+ if (menu_is_any_open(ted)) {
menu_update(ted);
}
@@ -1031,7 +1031,7 @@ int main(int argc, char **argv) {
if (arr_len(ted->mouse_releases[SDL_BUTTON_LEFT]))
ted->dragging_tab_node = NULL;
- if (ted->menu) {
+ if (menu_is_any_open(ted)) {
menu_render(ted);
}
@@ -1187,7 +1187,7 @@ int main(int argc, char **argv) {
if (ted->find)
find_close(ted);
build_stop(ted);
- if (ted->menu)
+ if (menu_is_any_open(ted))
menu_close(ted);
hover_quit(ted);
signature_help_quit(ted);