Fix rare infinite loop in layout of code files

master
Allen Webster 2020-02-03 16:20:22 -08:00
parent d9e196eda8
commit 3ec6d11230
1 changed files with 1 additions and 0 deletions

View File

@ -17,6 +17,7 @@ get_layout_reflex(Layout_Item_List *list, Buffer_ID buffer, f32 width, Face_ID f
function Rect_f32 function Rect_f32
layout_reflex_get_rect(Application_Links *app, Layout_Reflex *reflex, i64 pos, b32 *unresolved_dependence){ layout_reflex_get_rect(Application_Links *app, Layout_Reflex *reflex, i64 pos, b32 *unresolved_dependence){
Rect_f32 rect = {}; Rect_f32 rect = {};
pos = clamp_bot(0, pos);
if (range_contains(reflex->list->input_index_range, pos)){ if (range_contains(reflex->list->input_index_range, pos)){
if (range_contains(reflex->list->manifested_index_range, pos)){ if (range_contains(reflex->list->manifested_index_range, pos)){
rect = layout_box_of_pos(*reflex->list, pos); rect = layout_box_of_pos(*reflex->list, pos);