fixed bug that was preventing command line file loading
parent
602d41be70
commit
ac8ef58e95
|
@ -396,7 +396,7 @@ make_string_slowly(void *str)
|
||||||
String result;
|
String result;
|
||||||
result.str = (char*)str;
|
result.str = (char*)str;
|
||||||
result.size = str_size((char*)str);
|
result.size = str_size((char*)str);
|
||||||
result.memory_size = result.size;
|
result.memory_size = result.size+1;
|
||||||
return(result);
|
return(result);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
10
4ed.cpp
10
4ed.cpp
|
@ -1991,13 +1991,13 @@ App_Step_Sig(app_step){
|
||||||
|
|
||||||
i32 i = 0;
|
i32 i = 0;
|
||||||
Panel *panel = models->layout.used_sentinel.next;
|
Panel *panel = models->layout.used_sentinel.next;
|
||||||
for (; i < models->settings.init_files_count;
|
for (; i < models->settings.init_files_count; ++i, panel = panel->next){
|
||||||
++i, panel = panel->next){
|
|
||||||
String filename = make_string_slowly(models->settings.init_files[i]);
|
String filename = make_string_slowly(models->settings.init_files[i]);
|
||||||
|
|
||||||
if (i < models->layout.panel_count){
|
if (i < models->layout.panel_count){
|
||||||
view_open_file(system, models, panel->view, filename);
|
view_open_file(system, models, panel->view, filename);
|
||||||
view_show_file(panel->view);
|
view_show_file(panel->view);
|
||||||
|
Assert("Earlier" && panel->view->file_data.file != 0);
|
||||||
#if 0
|
#if 0
|
||||||
if (i == 0){
|
if (i == 0){
|
||||||
if (panel->view->file_data.file){
|
if (panel->view->file_data.file){
|
||||||
|
@ -2025,6 +2025,11 @@ App_Step_Sig(app_step){
|
||||||
view_set_file(panel->view, models->scratch_buffer, models);
|
view_set_file(panel->view, models->scratch_buffer, models);
|
||||||
view_show_file(panel->view);
|
view_show_file(panel->view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
panel = models->layout.used_sentinel.next;
|
||||||
|
for (i = 0; i < models->settings.init_files_count; ++i, panel = panel->next){
|
||||||
|
Assert(panel->view->file_data.file != 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE(allen): respond if the user is trying to kill the application
|
// NOTE(allen): respond if the user is trying to kill the application
|
||||||
|
@ -2111,7 +2116,6 @@ App_Step_Sig(app_step){
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// NOTE(allen): Keyboard input to command coroutine.
|
// NOTE(allen): Keyboard input to command coroutine.
|
||||||
|
|
||||||
if (models->command_coroutine != 0){
|
if (models->command_coroutine != 0){
|
||||||
Coroutine *command_coroutine = models->command_coroutine;
|
Coroutine *command_coroutine = models->command_coroutine;
|
||||||
u32 get_flags = models->command_coroutine_flags[0];
|
u32 get_flags = models->command_coroutine_flags[0];
|
||||||
|
|
|
@ -5320,19 +5320,17 @@ do_render_file_view(System_Functions *system, View *view, GUI_Scroll_Vars *scrol
|
||||||
i32 result = 0;
|
i32 result = 0;
|
||||||
|
|
||||||
GUI_Session gui_session = {0};
|
GUI_Session gui_session = {0};
|
||||||
GUI_Header *h;
|
GUI_Header *h = 0;
|
||||||
GUI_Target *gui_target = &view->gui_target;
|
GUI_Target *gui_target = &view->gui_target;
|
||||||
GUI_Interpret_Result interpret_result = {0};
|
GUI_Interpret_Result interpret_result = {0};
|
||||||
|
|
||||||
f32 v = {0};
|
f32 v = {0};
|
||||||
|
|
||||||
i32 max_y = view_compute_max_target_y(view);
|
i32 max_y = view_compute_max_target_y(view);
|
||||||
|
|
||||||
i16 font_id = 0;
|
i16 font_id = 0;
|
||||||
if (file){
|
|
||||||
font_id = file->settings.font_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Assert(file != 0);
|
||||||
|
|
||||||
|
font_id = file->settings.font_id;
|
||||||
if (gui_target->push.pos > 0){
|
if (gui_target->push.pos > 0){
|
||||||
gui_session_init(&gui_session, gui_target, rect, view->line_height);
|
gui_session_init(&gui_session, gui_target, rect, view->line_height);
|
||||||
|
|
||||||
|
@ -5361,7 +5359,7 @@ do_render_file_view(System_Functions *system, View *view, GUI_Scroll_Vars *scrol
|
||||||
|
|
||||||
case guicom_file:
|
case guicom_file:
|
||||||
{
|
{
|
||||||
if (file && file_is_ready(file)){
|
if (file_is_ready(file)){
|
||||||
result = draw_file_loaded(view, gui_session.rect, is_active, target);
|
result = draw_file_loaded(view, gui_session.rect, is_active, target);
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
|
|
2
TODO.txt
2
TODO.txt
|
@ -87,6 +87,7 @@
|
||||||
|
|
||||||
; BEFORE I SHIP
|
; BEFORE I SHIP
|
||||||
;
|
;
|
||||||
|
; [X] why are command line files not loading any more?
|
||||||
; [X] tokens in the custom API
|
; [X] tokens in the custom API
|
||||||
; [X] token seeking on custom side
|
; [X] token seeking on custom side
|
||||||
; [X] auto indent on the custom side
|
; [X] auto indent on the custom side
|
||||||
|
@ -97,7 +98,6 @@
|
||||||
; [] expose dirty flags
|
; [] expose dirty flags
|
||||||
; [] occasionally missing the (!) mark on files on windows
|
; [] occasionally missing the (!) mark on files on windows
|
||||||
; [] scroll down on compilation buffer durring compilation
|
; [] scroll down on compilation buffer durring compilation
|
||||||
; [] why are command line files not loading any more?
|
|
||||||
;
|
;
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -197,7 +197,7 @@ treating that as the size and memory size of the string.) */{
|
||||||
String result;
|
String result;
|
||||||
result.str = (char*)str;
|
result.str = (char*)str;
|
||||||
result.size = str_size((char*)str);
|
result.size = str_size((char*)str);
|
||||||
result.memory_size = result.size;
|
result.memory_size = result.size+1;
|
||||||
return(result);
|
return(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue