diff --git a/4coder_default_bindings.cpp b/4coder_default_bindings.cpp index 81c01275..57de388b 100644 --- a/4coder_default_bindings.cpp +++ b/4coder_default_bindings.cpp @@ -137,12 +137,6 @@ HOOK_SIG(my_start){ exec_command(app, change_active_panel); exec_command(app, hide_scrollbar); - { - View_Summary view = get_active_view(app, AccessAll); - int32_t width = view.file_region.x1 - view.file_region.x0; - default_wrap_width = width - 40; - } - // Theme options: // "4coder" // "Handmade Hero" diff --git a/4coder_default_include.cpp b/4coder_default_include.cpp index 0cbf1874..49233ee8 100644 --- a/4coder_default_include.cpp +++ b/4coder_default_include.cpp @@ -3503,7 +3503,8 @@ process_config_file(Application_Links *app){ int32_t size = ftell(file); char *mem = (char*)push_block(&global_part, size+1); fseek(file, 0, SEEK_SET); - fread(mem, 1, size, file); + int32_t check_size = fread(mem, 1, size, file); + if (check_size == size){ mem[size] = 0; fclose(file); @@ -3579,6 +3580,7 @@ process_config_file(Application_Links *app){ print_message(app, literal("Did not find config.4coder, using default settings")); } } +} #endif