summaryrefslogtreecommitdiff
path: root/ted.h
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 /ted.h
parent00fce97eb96fc2f1c1bfd8daf4f795ff36cf98c0 (diff)
per-language settings
also fixed ctrl+/ in go
Diffstat (limited to 'ted.h')
-rw-r--r--ted.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/ted.h b/ted.h
index 01ad115..b7ecf19 100644
--- a/ted.h
+++ b/ted.h
@@ -296,7 +296,8 @@ typedef struct Ted {
// the old active buffer needs to be restored. that's what this stores.
TextBuffer *prev_active_buffer;
Node *active_node;
- Settings settings;
+ Settings settings_by_language[LANG_COUNT];
+ Settings *settings; // "default" settings (equal to &settings_per_language[0])
float window_width, window_height;
u32 key_modifier; // which of shift, alt, ctrl are down right now.
v2 mouse_pos;
@@ -398,4 +399,6 @@ typedef struct Ted {
void command_execute(Ted *ted, Command c, i64 argument);
void ted_switch_to_buffer(Ted *ted, TextBuffer *buffer);
+// the settings of the active buffer, or the default settings if there is no active buffer
+Settings *ted_active_settings(Ted *ted);
static TextBuffer *find_search_buffer(Ted *ted);