diff --git a/4coder_API/4coder_types.h b/4coder_API/4coder_types.h index e35ab970..7fc762a0 100644 --- a/4coder_API/4coder_types.h +++ b/4coder_API/4coder_types.h @@ -1247,8 +1247,7 @@ STRUCT Found_String{ u32 flags; i32 string_id; - i32 start; - i32 end; + Range location; }; // TODO(casey): If this sticks around, there should be a way to export add/remove/merge as inlines that are shared diff --git a/4ed_api_implementation.cpp b/4ed_api_implementation.cpp index 073e0e60..b0b4dd6a 100644 --- a/4ed_api_implementation.cpp +++ b/4ed_api_implementation.cpp @@ -4527,7 +4527,7 @@ Find_All_In_Range_Insensitive(Application_Links *app, Buffer_ID buffer_id, i32 s while(*partial) { Found_String *check = *partial; - i32 trailing_char_at = ((check->start + key.size) - check->end); + i32 trailing_char_at = ((check->location.start + key.size) - check->location.end); i32 remaining = trailing_char_at; b32 valid = true; b32 full = true; @@ -4555,7 +4555,7 @@ Find_All_In_Range_Insensitive(Application_Links *app, Buffer_ID buffer_id, i32 s break; } } - check->end += remaining; + check->location.end += remaining; if(valid) { @@ -4643,8 +4643,8 @@ Find_All_In_Range_Insensitive(Application_Links *app, Buffer_ID buffer_id, i32 s found->buffer_id = buffer_id; found->flags = FoundString_Insensitive | exact_matched | clean_edegs; found->string_id = 0; - found->start = i + at; - found->end = found->start + remaining; + found->location.start = i + at; + found->location.end = found->location.start + remaining; // NOTE(casey): Although technically "full matches" are full, we haven't yet checked the trailing edge for tokenization, // so we need to shunt to partial in the cases where we _can't_ check the overhanging character.