diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-03-14 17:17:25 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-03-14 17:17:25 -0400 |
commit | 7391d9be671cd303fdebbf12bb9bc26958d13bf4 (patch) | |
tree | 706322b25ee785c6af9ab0c85cf025362f88f40d /build.c | |
parent | 624399da9992b92f59daef4a79575c338e989e3e (diff) |
fix bug where modifications weren't detected
also fix find scroll bug REALLY for real this time!
Diffstat (limited to 'build.c')
-rw-r--r-- | build.c | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -22,22 +22,22 @@ static void build_start_with_command(Ted *ted, char const *command) { build_stop(ted); } build_clear(ted); // clear errors from previous build - ted_save_all(ted); - - if (process_run(&ted->build_process, command)) { - ted->building = true; - ted->build_shown = true; - TextBuffer *build_buffer = &ted->build_buffer; - // new empty build output buffer - buffer_new_file(build_buffer, NULL); - build_buffer->store_undo_events = false; // don't need undo events for build output buffer - char32_t text[] = {'$', ' '}; - buffer_insert_text_at_cursor(build_buffer, str32(text, 2)); - buffer_insert_utf8_at_cursor(build_buffer, command); - buffer_insert_char_at_cursor(build_buffer, '\n'); - build_buffer->view_only = true; - } else { - ted_seterr(ted, "Couldn't start build: %s", process_geterr(&ted->build_process)); + if (ted_save_all(ted)) { + if (process_run(&ted->build_process, command)) { + ted->building = true; + ted->build_shown = true; + TextBuffer *build_buffer = &ted->build_buffer; + // new empty build output buffer + buffer_new_file(build_buffer, NULL); + build_buffer->store_undo_events = false; // don't need undo events for build output buffer + char32_t text[] = {'$', ' '}; + buffer_insert_text_at_cursor(build_buffer, str32(text, 2)); + buffer_insert_utf8_at_cursor(build_buffer, command); + buffer_insert_char_at_cursor(build_buffer, '\n'); + build_buffer->view_only = true; + } else { + ted_seterr(ted, "Couldn't start build: %s", process_geterr(&ted->build_process)); + } } } |