summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-07-29 14:29:36 -0400
committerpommicket <pommicket@gmail.com>2022-07-29 14:33:32 -0400
commitab65fe136f7a8739b78aaa4801a9fb761a301417 (patch)
treed9193726574c6ed7884562ad2c376bef48905b58 /menu.c
parent00fce97eb96fc2f1c1bfd8daf4f795ff36cf98c0 (diff)
per-language settings
also fixed ctrl+/ in go
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/menu.c b/menu.c
index 9e7a382..ae69eac 100644
--- a/menu.c
+++ b/menu.c
@@ -101,13 +101,13 @@ static void menu_escape(Ted *ted) {
}
static float menu_get_width(Ted *ted) {
- Settings *settings = &ted->settings;
+ Settings const *settings = ted->settings;
return minf(settings->max_menu_width, ted->window_width - 2.0f * settings->padding);
}
// returns the rectangle of the screen coordinates of the menu
static Rect menu_rect(Ted *ted) {
- Settings *settings = &ted->settings;
+ Settings *settings = ted->settings;
float window_width = ted->window_width, window_height = ted->window_height;
float padding = settings->padding;
float menu_width = menu_get_width(ted);
@@ -119,7 +119,7 @@ static Rect menu_rect(Ted *ted) {
static void menu_update(Ted *ted) {
Menu menu = ted->menu;
- Settings const *settings = &ted->settings;
+ Settings const *settings = ted->settings;
u32 const *colors = settings->colors;
TextBuffer *line_buffer = &ted->line_buffer;
@@ -316,7 +316,7 @@ static void menu_update(Ted *ted) {
static void menu_render(Ted *ted) {
Menu menu = ted->menu;
assert(menu);
- Settings const *settings = &ted->settings;
+ Settings const *settings = ted->settings;
u32 const *colors = settings->colors;
float const window_width = ted->window_width, window_height = ted->window_height;
Font *font_bold = ted->font_bold, *font = ted->font;