fixed scroll location on file change bug
This commit is contained in:
parent
bfb02009d6
commit
b6f86f4f8d
5
4ed.cpp
5
4ed.cpp
|
@ -3803,6 +3803,8 @@ App_Step_Sig(app_step){
|
||||||
active = (panel == cmd->panel);
|
active = (panel == cmd->panel);
|
||||||
summary = (active)?(active_input):(dead_input);
|
summary = (active)?(active_input):(dead_input);
|
||||||
|
|
||||||
|
view->changed_context_in_step = 0;
|
||||||
|
|
||||||
View_Step_Result result = step_file_view(system, view, active_view, summary);
|
View_Step_Result result = step_file_view(system, view, active_view, summary);
|
||||||
if (result.animating){
|
if (result.animating){
|
||||||
app_result.animating = 1;
|
app_result.animating = 1;
|
||||||
|
@ -3817,6 +3819,8 @@ App_Step_Sig(app_step){
|
||||||
|
|
||||||
for (dll_items(panel, used_panels)){
|
for (dll_items(panel, used_panels)){
|
||||||
view = panel->view;
|
view = panel->view;
|
||||||
|
|
||||||
|
if (view->changed_context_in_step == 0){
|
||||||
Assert(view->current_scroll);
|
Assert(view->current_scroll);
|
||||||
active = (panel == cmd->panel);
|
active = (panel == cmd->panel);
|
||||||
summary = (active)?(active_input):(dead_input);
|
summary = (active)?(active_input):(dead_input);
|
||||||
|
@ -3836,6 +3840,7 @@ App_Step_Sig(app_step){
|
||||||
view->scroll_region = result.region;
|
view->scroll_region = result.region;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
update_command_data(vars, cmd);
|
update_command_data(vars, cmd);
|
||||||
|
|
||||||
|
|
|
@ -234,6 +234,8 @@ struct View{
|
||||||
char dest_[256];
|
char dest_[256];
|
||||||
String dest;
|
String dest;
|
||||||
|
|
||||||
|
b32 changed_context_in_step;
|
||||||
|
|
||||||
// theme stuff
|
// theme stuff
|
||||||
View *hot_file_view;
|
View *hot_file_view;
|
||||||
u32 *palette;
|
u32 *palette;
|
||||||
|
@ -3070,6 +3072,7 @@ view_show_menu(View *view, Command_Map *gui_map){
|
||||||
view->map = gui_map;
|
view->map = gui_map;
|
||||||
view->showing_ui = VUI_Menu;
|
view->showing_ui = VUI_Menu;
|
||||||
view->current_scroll = &view->gui_scroll;
|
view->current_scroll = &view->gui_scroll;
|
||||||
|
view->changed_context_in_step = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
|
@ -3077,6 +3080,7 @@ view_show_config(View *view, Command_Map *gui_map){
|
||||||
view->map = gui_map;
|
view->map = gui_map;
|
||||||
view->showing_ui = VUI_Config;
|
view->showing_ui = VUI_Config;
|
||||||
view->current_scroll = &view->gui_scroll;
|
view->current_scroll = &view->gui_scroll;
|
||||||
|
view->changed_context_in_step = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
|
@ -3097,6 +3101,7 @@ view_show_interactive(System_Functions *system, View *view,
|
||||||
|
|
||||||
hot_directory_clean_end(&models->hot_directory);
|
hot_directory_clean_end(&models->hot_directory);
|
||||||
hot_directory_reload(system, &models->hot_directory, &models->working_set);
|
hot_directory_reload(system, &models->hot_directory, &models->working_set);
|
||||||
|
view->changed_context_in_step = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
|
@ -3107,6 +3112,7 @@ view_show_theme(View *view, Command_Map *gui_map){
|
||||||
view->color = super_color_create(0xFF000000);
|
view->color = super_color_create(0xFF000000);
|
||||||
view->current_color_editing = 0;
|
view->current_color_editing = 0;
|
||||||
view->current_scroll = &view->gui_scroll;
|
view->current_scroll = &view->gui_scroll;
|
||||||
|
view->changed_context_in_step = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
|
@ -3121,6 +3127,7 @@ view_show_file(View *view){
|
||||||
view->showing_ui = VUI_None;
|
view->showing_ui = VUI_None;
|
||||||
view->current_scroll = &view->recent->scroll;
|
view->current_scroll = &view->recent->scroll;
|
||||||
view->recent->scroll.max_y = view_compute_max_target_y(view);
|
view->recent->scroll.max_y = view_compute_max_target_y(view);
|
||||||
|
view->changed_context_in_step = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void
|
internal void
|
||||||
|
|
|
@ -22,8 +22,8 @@ popd
|
||||||
|
|
||||||
pushd ..\build
|
pushd ..\build
|
||||||
REM call "..\code\buildsuper.bat" ..\code\4coder_default_bindings.cpp
|
REM call "..\code\buildsuper.bat" ..\code\4coder_default_bindings.cpp
|
||||||
REM call "..\code\buildsuper.bat" ..\code\power\4coder_experiments.cpp
|
call "..\code\buildsuper.bat" ..\code\power\4coder_experiments.cpp
|
||||||
call "..\code\buildsuper.bat" ..\code\power\4coder_casey.cpp
|
REM call "..\code\buildsuper.bat" ..\code\power\4coder_casey.cpp
|
||||||
if %ERRORLEVEL% neq 0 (set FirstError=1)
|
if %ERRORLEVEL% neq 0 (set FirstError=1)
|
||||||
|
|
||||||
set EXPORTS=/EXPORT:app_get_functions
|
set EXPORTS=/EXPORT:app_get_functions
|
||||||
|
|
Loading…
Reference in New Issue