summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-03-02 16:58:54 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-03-02 17:00:50 -0500
commit64bfab15c19ef0e0055b7b80b315a872b8946ce4 (patch)
tree127262140ebe8008c10e16e5009e1b8257bc9ced /main.c
parent3600ff8d24ea87a0b63e4931010e0dd52232246c (diff)
start command selector
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/main.c b/main.c
index ec4ffc3..8f1c298 100644
--- a/main.c
+++ b/main.c
@@ -461,6 +461,10 @@ int main(int argc, char **argv) {
strcpy(config_err, ted->error);
ted_clearerr(ted); // clear the error so later things (e.g. loading font) don't detect an error
}
+
+ if (ted->search_cwd) {
+ config_read(ted, "ted.cfg");
+ }
}
@@ -530,6 +534,7 @@ int main(int argc, char **argv) {
}
line_buffer_create(&ted->find_buffer, ted);
line_buffer_create(&ted->replace_buffer, ted);
+ line_buffer_create(&ted->argument_buffer, ted);
buffer_create(&ted->build_buffer, ted);
{
@@ -903,7 +908,7 @@ int main(int argc, char **argv) {
i32 ms_wait = (i32)((frame_end_noswap - frame_start) * 1000);
if (ms_wait > 0) {
ms_wait -= 1; // give swap an extra ms to make sure it's actually vsynced
- SDL_Delay(ms_wait);
+ SDL_Delay((u32)ms_wait);
}
SDL_GL_SwapWindow(window);
PROFILE_TIME(frame_end);
@@ -945,6 +950,7 @@ int main(int argc, char **argv) {
buffer_free(&ted->find_buffer);
buffer_free(&ted->replace_buffer);
buffer_free(&ted->build_buffer);
+ buffer_free(&ted->argument_buffer);
text_font_free(ted->font);
text_font_free(ted->font_bold);
settings_free(&ted->settings);