summaryrefslogtreecommitdiff
path: root/ted-base.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-01-06 13:35:31 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-01-06 13:35:31 -0500
commit9e055b2e25455fc4fa0376495ccc9335059f3131 (patch)
treeef9e2362dece86193c07d8e1fcf40923b8a8caca /ted-base.c
parent306505e714b7caf146b8ec8386b407d57555563d (diff)
start open menu
Diffstat (limited to 'ted-base.c')
-rw-r--r--ted-base.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ted-base.c b/ted-base.c
index 6ac9c5f..ca0fbbb 100644
--- a/ted-base.c
+++ b/ted-base.c
@@ -82,3 +82,15 @@ static void ted_load_font(Ted *ted) {
ted_seterr(ted, "Couldn't find font file. There is probably a problem with your ted installation.");
}
}
+
+static void ted_menu_open(Ted *ted, Menu menu) {
+ ted->menu = menu;
+ ted->prev_active_buffer = ted->active_buffer;
+ ted->active_buffer = NULL;
+}
+
+static void ted_menu_close(Ted *ted, bool restore_prev_active_buffer) {
+ ted->menu = MENU_NONE;
+ if (restore_prev_active_buffer) ted->active_buffer = ted->prev_active_buffer;
+ ted->prev_active_buffer = NULL;
+}