diff options
-rw-r--r-- | build.c | 11 | ||||
-rw-r--r-- | config.c | 1 | ||||
-rw-r--r-- | main.c | 3 | ||||
-rw-r--r-- | ted.cfg | 2 | ||||
-rw-r--r-- | ted.h | 1 |
5 files changed, 13 insertions, 5 deletions
@@ -199,6 +199,8 @@ static bool is_source_path(char32_t c) { // make sure you set ted->build_dir before running this! void build_check_for_errors(Ted *ted) { + const Settings *settings = ted_active_settings(ted); + TextBuffer *buffer = &ted->build_buffer; arr_clear(ted->build_errors); for (u32 line_idx = 0; line_idx < buffer->nlines; ++line_idx) { @@ -298,9 +300,12 @@ void build_check_for_errors(Ted *ted) { } } } - // go to the first error (if there is one) - ted->build_error = 0; - build_go_to_error(ted); + + if (settings->jump_to_build_error) { + // go to the first error (if there is one) + ted->build_error = 0; + build_go_to_error(ted); + } } void build_frame(Ted *ted, float x1, float y1, float x2, float y2) { @@ -99,6 +99,7 @@ static const SettingBool settings_bool[] = { {"highlight-auto", &settings_zero.highlight_auto, true}, {"save-backup", &settings_zero.save_backup, true}, {"crlf-windows", &settings_zero.crlf_windows, true}, + {"jump-to-build-error", &settings_zero.jump_to_build_error, true}, }; static const SettingU8 settings_u8[] = { {"tab-width", &settings_zero.tab_width, 1, 100, true}, @@ -1,9 +1,8 @@ /* TODO: -- option for whether to jump to build error when the build command finishes, and maybe :build-jump, :build-nojump commands -- highlight TODO, FIXME, XXX, others(?) in comments - :go-to-matching-bracket FUTURE FEATURES: +- highlight TODO, FIXME, XXX, others(?) in comments - autodetect indentation (tabs vs spaces) - better undo chaining (dechain on backspace?) - font setting & support for multiple fonts to cover more characters @@ -35,6 +35,8 @@ build-default-command = make # [/my/fav/project//core] # build-command = "supermake --treble-clef -rxvt" build-command = "" +# whether or not to jump to the first build error when the build completes. +jump-to-build-error = yes # restore previously opened files when ted is launched? restore-session = on # show autocomplete menu when a trigger character (e.g. '.') is typed (LSP only) @@ -273,6 +273,7 @@ typedef struct { bool vsync; bool save_backup; bool crlf_windows; + bool jump_to_build_error; KeyCombo hover_key; KeyCombo highlight_key; u8 tab_width; |