mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-07 14:28:40 +00:00
file path map, replacement file picking
This commit is contained in:
@@ -52,7 +52,7 @@ str8_lit_comp(""),
|
|||||||
str8_lit_comp(""),
|
str8_lit_comp(""),
|
||||||
};
|
};
|
||||||
|
|
||||||
RD_VocabInfo rd_vocab_info_table[324] =
|
RD_VocabInfo rd_vocab_info_table[325] =
|
||||||
{
|
{
|
||||||
{str8_lit_comp("auto_view_rule"), str8_lit_comp("auto_view_rules"), str8_lit_comp("Auto View Rule"), str8_lit_comp("Auto View Rules"), RD_IconKind_Binoculars},
|
{str8_lit_comp("auto_view_rule"), str8_lit_comp("auto_view_rules"), str8_lit_comp("Auto View Rule"), str8_lit_comp("Auto View Rules"), RD_IconKind_Binoculars},
|
||||||
{str8_lit_comp("file_path_map"), str8_lit_comp("file_path_maps"), str8_lit_comp("File Path Map"), str8_lit_comp("File Path Maps"), RD_IconKind_FileOutline},
|
{str8_lit_comp("file_path_map"), str8_lit_comp("file_path_maps"), str8_lit_comp("File Path Map"), str8_lit_comp("File Path Maps"), RD_IconKind_FileOutline},
|
||||||
@@ -336,6 +336,7 @@ RD_VocabInfo rd_vocab_info_table[324] =
|
|||||||
{str8_lit_comp("add_watch_pin"), str8_lit_comp(""), str8_lit_comp("Add Watch Pin"), str8_lit_comp(""), RD_IconKind_Pin},
|
{str8_lit_comp("add_watch_pin"), str8_lit_comp(""), str8_lit_comp("Add Watch Pin"), str8_lit_comp(""), RD_IconKind_Pin},
|
||||||
{str8_lit_comp("toggle_watch_pin"), str8_lit_comp(""), str8_lit_comp("Toggle Watch Pin"), str8_lit_comp(""), RD_IconKind_Pin},
|
{str8_lit_comp("toggle_watch_pin"), str8_lit_comp(""), str8_lit_comp("Toggle Watch Pin"), str8_lit_comp(""), RD_IconKind_Pin},
|
||||||
{str8_lit_comp("add_auto_view_rule"), str8_lit_comp(""), str8_lit_comp("Add Auto View Rule"), str8_lit_comp(""), RD_IconKind_Binoculars},
|
{str8_lit_comp("add_auto_view_rule"), str8_lit_comp(""), str8_lit_comp("Add Auto View Rule"), str8_lit_comp(""), RD_IconKind_Binoculars},
|
||||||
|
{str8_lit_comp("add_file_path_map"), str8_lit_comp(""), str8_lit_comp("Add File Path Map"), str8_lit_comp(""), RD_IconKind_FileOutline},
|
||||||
{str8_lit_comp("open_theme"), str8_lit_comp(""), str8_lit_comp("Open Theme"), str8_lit_comp(""), RD_IconKind_Palette},
|
{str8_lit_comp("open_theme"), str8_lit_comp(""), str8_lit_comp("Open Theme"), str8_lit_comp(""), RD_IconKind_Palette},
|
||||||
{str8_lit_comp("add_theme_color"), str8_lit_comp(""), str8_lit_comp("Add Theme Color"), str8_lit_comp(""), RD_IconKind_Palette},
|
{str8_lit_comp("add_theme_color"), str8_lit_comp(""), str8_lit_comp("Add Theme Color"), str8_lit_comp(""), RD_IconKind_Palette},
|
||||||
{str8_lit_comp("fork_loaded_theme_colors"), str8_lit_comp(""), str8_lit_comp("Fork Loaded Theme Colors"), str8_lit_comp(""), RD_IconKind_Palette},
|
{str8_lit_comp("fork_loaded_theme_colors"), str8_lit_comp(""), str8_lit_comp("Fork Loaded Theme Colors"), str8_lit_comp(""), RD_IconKind_Palette},
|
||||||
@@ -454,7 +455,7 @@ Rng1U64 rd_reg_slot_range_table[43] =
|
|||||||
{OffsetOf(RD_Regs, os_event), OffsetOf(RD_Regs, os_event) + sizeof(OS_Event *)},
|
{OffsetOf(RD_Regs, os_event), OffsetOf(RD_Regs, os_event) + sizeof(OS_Event *)},
|
||||||
};
|
};
|
||||||
|
|
||||||
RD_CmdKindInfo rd_cmd_kind_info_table[218] =
|
RD_CmdKindInfo rd_cmd_kind_info_table[219] =
|
||||||
{
|
{
|
||||||
{0},
|
{0},
|
||||||
{ str8_lit_comp("launch_and_run"), str8_lit_comp("Starts debugging a new instance of a target, then runs."), str8_lit_comp("launch,start,run,target"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:targets"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
{ str8_lit_comp("launch_and_run"), str8_lit_comp("Starts debugging a new instance of a target, then runs."), str8_lit_comp("launch,start,run,target"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:targets"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||||
@@ -631,7 +632,8 @@ RD_CmdKindInfo rd_cmd_kind_info_table[218] =
|
|||||||
{ str8_lit_comp("disable_breakpoint"), str8_lit_comp("Disables a breakpoint."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:breakpoints"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
{ str8_lit_comp("disable_breakpoint"), str8_lit_comp("Disables a breakpoint."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:breakpoints"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||||
{ str8_lit_comp("add_watch_pin"), str8_lit_comp("Places a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp("$watch_pins,"), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Expr, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
{ str8_lit_comp("add_watch_pin"), str8_lit_comp("Places a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp("$watch_pins,"), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Expr, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||||
{ str8_lit_comp("toggle_watch_pin"), str8_lit_comp("Places or removes a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Expr, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
{ str8_lit_comp("toggle_watch_pin"), str8_lit_comp("Places or removes a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Expr, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||||
{ str8_lit_comp("add_auto_view_rule"), str8_lit_comp("Adds a new auto view rule."), str8_lit_comp(""), str8_lit_comp("$auto_view_rules,"), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_String, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
{ str8_lit_comp("add_auto_view_rule"), str8_lit_comp("Adds a new auto view rule."), str8_lit_comp(""), str8_lit_comp("$auto_view_rules,"), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_String, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||||
|
{ str8_lit_comp("add_file_path_map"), str8_lit_comp("Adds a new file path map."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||||
{ str8_lit_comp("open_theme"), str8_lit_comp("Opens a theme file."), str8_lit_comp("color"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
{ str8_lit_comp("open_theme"), str8_lit_comp("Opens a theme file."), str8_lit_comp("color"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||||
{ str8_lit_comp("add_theme_color"), str8_lit_comp("Adds a new theme color."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
{ str8_lit_comp("add_theme_color"), str8_lit_comp("Adds a new theme color."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||||
{ str8_lit_comp("fork_loaded_theme_colors"), str8_lit_comp("Imports all colors from a loaded color theme file or color theme preset, so they can be individually edited."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
{ str8_lit_comp("fork_loaded_theme_colors"), str8_lit_comp("Imports all colors from a loaded color theme file or color theme preset, so they can be individually edited."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||||
|
|||||||
@@ -232,6 +232,7 @@ RD_CmdKind_DisableBreakpoint,
|
|||||||
RD_CmdKind_AddWatchPin,
|
RD_CmdKind_AddWatchPin,
|
||||||
RD_CmdKind_ToggleWatchPin,
|
RD_CmdKind_ToggleWatchPin,
|
||||||
RD_CmdKind_AddAutoViewRule,
|
RD_CmdKind_AddAutoViewRule,
|
||||||
|
RD_CmdKind_AddFilePathMap,
|
||||||
RD_CmdKind_OpenTheme,
|
RD_CmdKind_OpenTheme,
|
||||||
RD_CmdKind_AddThemeColor,
|
RD_CmdKind_AddThemeColor,
|
||||||
RD_CmdKind_ForkLoadedThemeColors,
|
RD_CmdKind_ForkLoadedThemeColors,
|
||||||
@@ -677,7 +678,7 @@ Z(getting_started)\
|
|||||||
C_LINKAGE_BEGIN
|
C_LINKAGE_BEGIN
|
||||||
extern String8 rd_tab_fast_path_view_name_table[20];
|
extern String8 rd_tab_fast_path_view_name_table[20];
|
||||||
extern String8 rd_tab_fast_path_query_name_table[20];
|
extern String8 rd_tab_fast_path_query_name_table[20];
|
||||||
extern RD_VocabInfo rd_vocab_info_table[324];
|
extern RD_VocabInfo rd_vocab_info_table[325];
|
||||||
extern RD_NameSchemaInfo rd_name_schema_info_table[23];
|
extern RD_NameSchemaInfo rd_name_schema_info_table[23];
|
||||||
extern Rng1U64 rd_reg_slot_range_table[43];
|
extern Rng1U64 rd_reg_slot_range_table[43];
|
||||||
extern String8 rd_binding_version_remap_old_name_table[8];
|
extern String8 rd_binding_version_remap_old_name_table[8];
|
||||||
|
|||||||
@@ -931,7 +931,10 @@ RD_CmdTable: // | | | |
|
|||||||
{ToggleWatchPin 1 0 0 0 "" Expr null Nil Null 0 0 0 0 1 1 1 Pin "toggle_watch_pin" "Toggle Watch Pin" "Places or removes a watch pin at a given location (file path and line number or address)." "" "" }
|
{ToggleWatchPin 1 0 0 0 "" Expr null Nil Null 0 0 0 0 1 1 1 Pin "toggle_watch_pin" "Toggle Watch Pin" "Places or removes a watch pin at a given location (file path and line number or address)." "" "" }
|
||||||
|
|
||||||
//- rjf: auto view rule
|
//- rjf: auto view rule
|
||||||
{AddAutoViewRule 1 1 0 0 "" String null Nil Null 0 0 0 0 0 0 0 Binoculars "add_auto_view_rule" "Add Auto View Rule" "Adds a new auto view rule." "" "$auto_view_rules," }
|
{AddAutoViewRule 0 0 0 0 "" String null Nil Null 0 0 0 0 0 0 0 Binoculars "add_auto_view_rule" "Add Auto View Rule" "Adds a new auto view rule." "" "$auto_view_rules," }
|
||||||
|
|
||||||
|
//- rjf: file path maps
|
||||||
|
{AddFilePathMap 0 0 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 FileOutline "add_file_path_map" "Add File Path Map" "Adds a new file path map." "" "" }
|
||||||
|
|
||||||
//- rjf: themes
|
//- rjf: themes
|
||||||
{OpenTheme 1 1 0 0 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 Palette "open_theme" "Open Theme" "Opens a theme file." "color" "" }
|
{OpenTheme 1 1 0 0 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 Palette "open_theme" "Open Theme" "Opens a theme file." "color" "" }
|
||||||
|
|||||||
@@ -6969,11 +6969,16 @@ rd_window_frame(void)
|
|||||||
if(input != &rd_nil_cfg)
|
if(input != &rd_nil_cfg)
|
||||||
{
|
{
|
||||||
String8 path_chopped = str8_chop_last_slash(input->first->string);
|
String8 path_chopped = str8_chop_last_slash(input->first->string);
|
||||||
|
RD_Cfg *user = rd_cfg_child_from_string(rd_state->root_cfg, str8_lit("user"));
|
||||||
|
RD_Cfg *current_path = rd_cfg_child_from_string_or_alloc(user, str8_lit("current_path"));
|
||||||
|
if(!str8_match(current_path->first->string, path_chopped, 0))
|
||||||
|
{
|
||||||
rd_cmd(RD_CmdKind_SetCurrentPath, .file_path = path_chopped);
|
rd_cmd(RD_CmdKind_SetCurrentPath, .file_path = path_chopped);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
//- rjf: @window_ui_part top bar
|
//- rjf: @window_ui_part top bar
|
||||||
@@ -15100,30 +15105,33 @@ rd_frame(void)
|
|||||||
case RD_CmdKind_CompleteQuery:
|
case RD_CmdKind_CompleteQuery:
|
||||||
{
|
{
|
||||||
// rjf: unpack params
|
// rjf: unpack params
|
||||||
|
RD_Cfg *window = rd_cfg_from_id(rd_regs()->window);
|
||||||
|
RD_WindowState *ws = rd_window_state_from_cfg(window);
|
||||||
RD_Cfg *view = rd_cfg_from_id(rd_regs()->view);
|
RD_Cfg *view = rd_cfg_from_id(rd_regs()->view);
|
||||||
String8 cmd_name = rd_view_query_cmd();
|
String8 cmd_name = rd_view_query_cmd();
|
||||||
|
|
||||||
|
// rjf: find out if this view is a lister
|
||||||
|
B32 is_lister = (rd_cfg_child_from_string(view, str8_lit("lister")) != &rd_nil_cfg);
|
||||||
|
|
||||||
// rjf: push command
|
// rjf: push command
|
||||||
if(cmd_name.size != 0) RD_RegsScope()
|
if(cmd_name.size != 0) RD_RegsScope()
|
||||||
{
|
{
|
||||||
|
if(is_lister)
|
||||||
|
{
|
||||||
|
rd_regs()->view = ws->query_regs->view;
|
||||||
|
}
|
||||||
rd_push_cmd(cmd_name, rd_regs());
|
rd_push_cmd(cmd_name, rd_regs());
|
||||||
}
|
}
|
||||||
|
|
||||||
// rjf: find out if this view is a lister
|
|
||||||
B32 is_lister = (rd_cfg_child_from_string(view, str8_lit("lister")) != &rd_nil_cfg);
|
|
||||||
|
|
||||||
// rjf: complete query, either by closing the query popup, or closing the
|
// rjf: complete query, either by closing the query popup, or closing the
|
||||||
// tab-embedded query edit
|
// tab-embedded query edit
|
||||||
RD_CmdKindInfo *cmd_kind_info = rd_cmd_kind_info_from_string(cmd_name);
|
RD_CmdKindInfo *cmd_kind_info = rd_cmd_kind_info_from_string(cmd_name);
|
||||||
if(is_lister)
|
if(is_lister)
|
||||||
{
|
{
|
||||||
RD_Cfg *window = rd_cfg_from_id(rd_regs()->window);
|
|
||||||
RD_WindowState *ws = rd_window_state_from_cfg(window);
|
|
||||||
ws->query_is_active = 0;
|
ws->query_is_active = 0;
|
||||||
}
|
}
|
||||||
else if(!(cmd_kind_info->query.flags & RD_QueryFlag_KeepOldInput))
|
else if(!(cmd_kind_info->query.flags & RD_QueryFlag_KeepOldInput))
|
||||||
{
|
{
|
||||||
RD_Cfg *view = rd_cfg_from_id(rd_regs()->view);
|
|
||||||
RD_ViewState *vs = rd_view_state_from_cfg(view);
|
RD_ViewState *vs = rd_view_state_from_cfg(view);
|
||||||
vs->query_is_selected = 0;
|
vs->query_is_selected = 0;
|
||||||
vs->query_string_size = 0;
|
vs->query_string_size = 0;
|
||||||
@@ -15357,6 +15365,13 @@ rd_frame(void)
|
|||||||
rd_cfg_new(project, str8_lit("auto_view_rule"));
|
rd_cfg_new(project, str8_lit("auto_view_rule"));
|
||||||
}break;
|
}break;
|
||||||
|
|
||||||
|
//- rjf: file path maps
|
||||||
|
case RD_CmdKind_AddFilePathMap:
|
||||||
|
{
|
||||||
|
RD_Cfg *project = rd_cfg_child_from_string(rd_state->root_cfg, str8_lit("user"));
|
||||||
|
rd_cfg_new(project, str8_lit("file_path_map"));
|
||||||
|
}break;
|
||||||
|
|
||||||
//- rjf: themes
|
//- rjf: themes
|
||||||
case RD_CmdKind_OpenTheme:
|
case RD_CmdKind_OpenTheme:
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user