mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-13 07:32:23 -07:00
fix horizontal scroll in text containers causing repeated hidden animation
This commit is contained in:
@@ -5153,7 +5153,7 @@ DF_VIEW_UI_FUNCTION_DEF(Code)
|
||||
if(txti_buffer_is_ready) UI_Parent(container_box)
|
||||
{
|
||||
//- rjf: build fractional space
|
||||
container_box->view_off.x = view->scroll_pos.x.idx + view->scroll_pos.x.off;
|
||||
container_box->view_off.x = container_box->view_off_target.x = view->scroll_pos.x.idx + view->scroll_pos.x.off;
|
||||
container_box->view_off.y = container_box->view_off_target.y = code_line_height*mod_f32(view->scroll_pos.y.off, 1.f) + code_line_height*(view->scroll_pos.y.off < 0) - code_line_height*(view->scroll_pos.y.off == -1.f && view->scroll_pos.y.idx == 1);
|
||||
|
||||
//- rjf: build code slice
|
||||
@@ -6033,7 +6033,7 @@ DF_VIEW_UI_FUNCTION_DEF(Disassembly)
|
||||
if(has_disasm) UI_Parent(container_box)
|
||||
{
|
||||
//- rjf: build fractional space
|
||||
container_box->view_off.x = view->scroll_pos.x.idx + view->scroll_pos.x.off;
|
||||
container_box->view_off.x = container_box->view_off_target.x = view->scroll_pos.x.idx + view->scroll_pos.x.off;
|
||||
container_box->view_off.y = container_box->view_off_target.y = code_line_height*mod_f32(view->scroll_pos.y.off, 1.f) + code_line_height*(view->scroll_pos.y.off < 0) - code_line_height*(view->scroll_pos.y.off == -1.f && view->scroll_pos.y.idx == 1);
|
||||
|
||||
//- rjf: build code slice
|
||||
@@ -6967,7 +6967,7 @@ DF_VIEW_UI_FUNCTION_DEF(Output)
|
||||
if(txti_buffer_is_ready) UI_Parent(container_box)
|
||||
{
|
||||
//- rjf: build fractional space
|
||||
container_box->view_off.x = view->scroll_pos.x.idx + view->scroll_pos.x.off;
|
||||
container_box->view_off.x = container_box->view_off_target.x = view->scroll_pos.x.idx + view->scroll_pos.x.off;
|
||||
container_box->view_off.y = container_box->view_off_target.y = code_line_height*mod_f32(view->scroll_pos.y.off, 1.f) + code_line_height*(view->scroll_pos.y.off < 0) - code_line_height*(view->scroll_pos.y.off == -1.f && view->scroll_pos.y.idx == 1);
|
||||
|
||||
//- rjf: build code slice
|
||||
@@ -7723,7 +7723,7 @@ DF_VIEW_UI_FUNCTION_DEF(Memory)
|
||||
UI_BoxFlag_AllowOverflowX|
|
||||
UI_BoxFlag_AllowOverflowY,
|
||||
"scrollable_box");
|
||||
scrollable_box->view_off.x = view->scroll_pos.x.idx + view->scroll_pos.x.off;
|
||||
container_box->view_off.x = container_box->view_off_target.x = view->scroll_pos.x.idx + view->scroll_pos.x.off;
|
||||
scrollable_box->view_off.y = scrollable_box->view_off_target.y = floor_f32(row_height_px*mod_f32(view->scroll_pos.y.off, 1.f) + row_height_px*(view->scroll_pos.y.off < 0));
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -118,7 +118,7 @@ ui_nav_eat_action_node(UI_NavActionList *list, UI_NavActionNode *node)
|
||||
internal B32
|
||||
ui_nav_char_is_code_symbol(U8 c)
|
||||
{
|
||||
return (char_is_alpha(c) || char_is_digit(c, 10) || c == '_');
|
||||
return (char_is_alpha(c) || char_is_digit(c, 10) || c == '_');
|
||||
}
|
||||
|
||||
internal S64
|
||||
@@ -134,7 +134,7 @@ ui_nav_scanned_column_from_column(String8 string, S64 start_column, Side side)
|
||||
U8 byte = (col <= string.size) ? string.str[col-1] : 0;
|
||||
B32 is_non_space = !char_is_space(byte);
|
||||
B32 is_name = ui_nav_char_is_code_symbol(byte);
|
||||
|
||||
|
||||
if (((side == Side_Min) && (col == 1)) ||
|
||||
((side == Side_Max) && (col == string.size+1)) ||
|
||||
(found_non_space && !is_non_space) ||
|
||||
@@ -143,9 +143,9 @@ ui_nav_scanned_column_from_column(String8 string, S64 start_column, Side side)
|
||||
new_column = col + (!side && col != 1);
|
||||
break;
|
||||
} else if (!found_text && is_name) {
|
||||
found_text = 1;
|
||||
found_text = 1;
|
||||
} else if (!found_non_space && is_non_space ) {
|
||||
found_non_space = 1;
|
||||
found_non_space = 1;
|
||||
}
|
||||
}
|
||||
return new_column;
|
||||
|
||||
Reference in New Issue
Block a user