mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-11-17 11:40:13 -08:00
fix nil text visualizations; fix auto-load-recent-project
This commit is contained in:
1 parent
5ae286d67e
commit
fde13f52d3
7 files changed
+26
-11
No files matched your search
+6
-1
@@ -3002,13 +3002,18 @@ txt_text_info_from_hash_lang(Access *access, U128 hash, TXT_LangKind lang)
|
||||
} key = {hash, lang};
|
||||
#pragma pack(pop)
|
||||
String8 key_string = str8_struct(&key);
|
||||
AC_Artifact artifact = ac_artifact_from_key(access, key_string, txt_artifact_create, txt_artifact_destroy, 0, .flags = AC_Flag_Wide);
|
||||
B32 stale = 0;
|
||||
AC_Artifact artifact = ac_artifact_from_key(access, key_string, txt_artifact_create, txt_artifact_destroy, 0, .flags = AC_Flag_Wide, .stale_out = &stale);
|
||||
TXT_Artifact *txt_artifact = (TXT_Artifact *)artifact.u64[0];
|
||||
TXT_TextInfo info = {0};
|
||||
if(txt_artifact != 0)
|
||||
{
|
||||
info = txt_artifact->info;
|
||||
}
|
||||
else if(!stale)
|
||||
{
|
||||
info = txt_info_nil;
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
@@ -177,6 +177,14 @@ typedef TXT_TokenArray TXT_LangLexFunctionType(Arena *arena, U64 *bytes_processe
|
||||
//~ rjf: Globals
|
||||
|
||||
read_only global TXT_ScopeNode txt_scope_node_nil = {0};
|
||||
read_only global Rng1U64 txt_info_line_range_nil = {0};
|
||||
read_only global TXT_TextInfo txt_info_nil =
|
||||
{
|
||||
1,
|
||||
&txt_info_line_range_nil,
|
||||
0,
|
||||
TXT_LineEndKind_Null,
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Basic Helpers
|
||||
|
||||
Reference in new issue
Block a user