summaryrefslogtreecommitdiff
path: root/build.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-05-11 11:51:10 -0400
committerpommicket <pommicket@gmail.com>2023-05-11 11:51:10 -0400
commit0063db338f912a0cf961a738899b3757cba2340b (patch)
tree3ef5b780646cb0e7fabe1b932edbe8399c7541e6 /build.c
parent8ae9e18c008dba7e47c5750f7feb91df8bf723df (diff)
:jump-to-build-error setting
Diffstat (limited to 'build.c')
-rw-r--r--build.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/build.c b/build.c
index 9d7e3ad..d4804b2 100644
--- a/build.c
+++ b/build.c
@@ -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) {