mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-05 05:18:40 +00:00
extend autocompletion lister parameter detection, based on cursor position; feed through view rule parameters; correctly support cursor position with multi-arguments, regardless of which argument the cursor is on
This commit is contained in:
@@ -1269,7 +1269,8 @@ df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalW
|
||||
if(expr_editing_active && !edit_end && txt_pt_match(ewv->input_cursor, ewv->input_mark))
|
||||
{
|
||||
String8 input = str8(ewv->input_buffer, ewv->input_size);
|
||||
df_set_autocomp_lister_query(ws, sig.box->key, ctrl_ctx, DF_AutoCompListerFlag_Locals, input, ewv->input_cursor.column-1);
|
||||
DF_AutoCompListerParams params = {DF_AutoCompListerFlag_Locals};
|
||||
df_set_autocomp_lister_query(ws, sig.box->key, ctrl_ctx, ¶ms, input, ewv->input_cursor.column-1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1481,12 +1482,12 @@ df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalW
|
||||
if(rule_editing_active && !edit_end && txt_pt_match(ewv->input_cursor, ewv->input_mark))
|
||||
{
|
||||
String8 input = str8(ewv->input_buffer, ewv->input_size);
|
||||
DF_AutoCompListerFlags flags = df_view_rule_autocomp_lister_flags_from_input_cursor(input, ewv->input_cursor.column-1);
|
||||
if(flags == 0)
|
||||
DF_AutoCompListerParams params = df_view_rule_autocomp_lister_params_from_input_cursor(scratch.arena, input, ewv->input_cursor.column-1);
|
||||
if(params.flags == 0)
|
||||
{
|
||||
flags = DF_AutoCompListerFlag_ViewRules;
|
||||
params.flags = DF_AutoCompListerFlag_ViewRules;
|
||||
}
|
||||
df_set_autocomp_lister_query(ws, sig.box->key, ctrl_ctx, flags, input, ewv->input_cursor.column-1);
|
||||
df_set_autocomp_lister_query(ws, sig.box->key, ctrl_ctx, ¶ms, input, ewv->input_cursor.column-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user