From 598d72c0674bb059c0f38f03c4851bcc61e5852d Mon Sep 17 00:00:00 2001 From: pommicket Date: Sun, 13 Aug 2023 12:05:54 -0300 Subject: various little changes, remove calls to change_directory --- ted.h | 56 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 27 deletions(-) (limited to 'ted.h') diff --git a/ted.h b/ted.h index a670566..c8aaf71 100644 --- a/ted.h +++ b/ted.h @@ -22,15 +22,12 @@ extern "C" { #include "command.h" /// Version number -#define TED_VERSION "2.4.3" +#define TED_VERSION "3.0" /// Maximum path size ted handles. #define TED_PATH_MAX 1024 /// Config filename #define TED_CFG "ted.cfg" - -// If you are adding new languages, DO NOT change the constant values -// of the previous languages. It will mess up config files which use :set-language! enum { /// avoid using this and use LANG_TEXT instead. LANG_NONE = 0, @@ -87,7 +84,6 @@ typedef u32 SyntaxState; /// types of syntax highlighting enum SyntaxCharType { - // do not change these numbers as it will break backwards compatibility with plugins SYNTAX_NORMAL = 0, SYNTAX_KEYWORD = 1, SYNTAX_BUILTIN = 2, @@ -143,8 +139,6 @@ typedef struct { /// line number (0-indexed) u32 line; /// UTF-32 index of character in line - /// - /// (not the same as column, since a tab is `settings->tab_width` columns) u32 index; } BufferPos; @@ -155,9 +149,9 @@ enum { }; /// see \ref KEY_COMBO enum { - KEY_MODIFIER_CTRL_BIT, - KEY_MODIFIER_SHIFT_BIT, - KEY_MODIFIER_ALT_BIT + KEY_MODIFIER_CTRL_BIT = 0, + KEY_MODIFIER_SHIFT_BIT = 1, + KEY_MODIFIER_ALT_BIT = 2, }; /// see \ref KEY_COMBO #define KEY_MODIFIER_CTRL ((u32)1<build_dir` before running this! +/// +/// make sure you call \ref build_set_working_directory before calling this! void build_queue_finish(Ted *ted); /// set up the build output buffer. void build_setup_buffer(Ted *ted); +/// set directory for build commands. +void build_set_working_directory(Ted *ted, const char *dir); /// run a single command in the build window. -/// make sure you set `ted->build_dir` before running this! +/// +/// make sure you call \ref build_set_working_directory before calling this! void build_start_with_command(Ted *ted, const char *command); /// figure out which build command to run, and run it. void build_start(Ted *ted); -- cgit v1.2.3