diff --git a/4coder_api_transition_30_31.cpp b/4coder_api_transition_30_31.cpp index 99327e1d..6b2d25da 100644 --- a/4coder_api_transition_30_31.cpp +++ b/4coder_api_transition_30_31.cpp @@ -446,6 +446,14 @@ open_view(Application_Links *app, View_Summary *view_location, View_Split_Positi return(view); } +static View_ID +open_view(Application_Links *app, View_ID view_location, View_Split_Position position){ + View_Summary summary = {}; + get_view_summary(app, view_location, AccessAll, &summary); + summary = open_view(app, &summary, position); + return(summary.view_id); +} + static b32 close_view(Application_Links *app, View_Summary *view){ b32 result = false; @@ -497,33 +505,6 @@ enum{ ViewSplitKind_FixedPixels, }; -static b32 -view_set_split(Application_Links *app, View_Summary *view, View_Split_Kind kind, float t){ - b32 result = false; - if (view != 0 && view->exists){ - Panel_ID panel_id = 0; - if (view_get_panel(app, view->view_id, &panel_id)){ - Panel_ID parent_panel_id = 0; - if (panel_get_parent(app, panel_id, &parent_panel_id)){ - Panel_ID min_child_id = 0; - if (panel_get_child(app, parent_panel_id, PanelChild_Min, &min_child_id)){ - b32 panel_is_min = (min_child_id == panel_id); - Panel_Split_Kind panel_kind = 0; - if (kind == ViewSplitKind_Ratio){ - panel_kind = panel_is_min?PanelSplitKind_Ratio_Min:PanelSplitKind_Ratio_Max; - } - else{ - panel_kind = panel_is_min?PanelSplitKind_FixedPixels_Min:PanelSplitKind_FixedPixels_Max; - } - result = panel_set_split(app, parent_panel_id, panel_kind, t); - get_view_summary(app, view->view_id, AccessAll, view); - } - } - } - } - return(result); -} - static b32 view_compute_cursor(Application_Links *app, View_Summary *view, Buffer_Seek seek, Full_Cursor *cursor_out){ b32 result = false; diff --git a/4coder_api_transition_30_31_helpers.cpp b/4coder_api_transition_30_31_helpers.cpp index 4009225c..720773ab 100644 --- a/4coder_api_transition_30_31_helpers.cpp +++ b/4coder_api_transition_30_31_helpers.cpp @@ -656,6 +656,122 @@ isearch__update_highlight(Application_Links *app, View_Summary *view, Managed_Ob isearch__update_highlight(app, view==0?0:view->view_id, highlight, start, end); } +static void +get_view_prev(Application_Links *app, View_Summary *view, Access_Flag access){ + View_ID new_id = 0; + get_view_prev(app, view->view_id, access, &new_id); + get_view_summary(app, new_id, access, view); +} + +static void +get_next_view_looped_all_panels(Application_Links *app, View_Summary *view, Access_Flag access){ + View_ID new_id = get_next_view_looped_all_panels(app, view==0?0:view->view_id, access); + get_view_summary(app, new_id, access, view); +} + +static void +get_prev_view_looped_all_panels(Application_Links *app, View_Summary *view, Access_Flag access){ + View_ID new_id = get_prev_view_looped_all_panels(app, view->view_id, access); + get_view_summary(app, new_id, access, view); +} + +static void +refresh_view(Application_Links *app, View_Summary *view){ + *view = get_view(app, view->view_id, AccessAll); +} + +static String +get_string_in_view_range(Application_Links *app, Partition *arena, View_Summary *view){ + return(get_string_in_view_range(app, arena, view==0?0:view->view_id)); +} + +static b32 +view_set_split(Application_Links *app, View_Summary *view, View_Split_Kind kind, f32 t){ + b32 result = view_set_split(app, view==0?0:view->view_id, kind, t); + if (result && view != 0){ + get_view_summary(app, view->view_id, AccessAll, view); + } + return(result); +} + +static b32 +view_set_split_proportion(Application_Links *app, View_Summary *view, f32 t){ + b32 result = view_set_split_proportion(app, view==0?0:view->view_id, t); + if (result && view != 0){ + get_view_summary(app, view->view_id, AccessAll, view); + } + return(result); +} + +static b32 +view_set_split_pixel_size(Application_Links *app, View_Summary *view, i32 t){ + b32 result = view_set_split_pixel_size(app, view==0?0:view->view_id, t); + if (result && view != 0){ + get_view_summary(app, view->view_id, AccessAll, view); + } + return(result); +} + +static View_Summary +open_footer_panel(Application_Links *app, View_Summary *view){ + View_ID new_id = open_footer_panel(app, view==0?0:view->view_id); + View_Summary result = {}; + get_view_summary(app, new_id, AccessAll, &result); + return(result); +} + +static void +new_view_settings(Application_Links *app, View_Summary *view){ + new_view_settings(app, view==0?0:view->view_id); +} + +static void +view_set_passive(Application_Links *app, View_Summary *view, b32 value){ + view_set_passive(app, view==0?0:view->view_id, value); +} + +static b32 +view_get_is_passive(Application_Links *app, View_Summary *view){ + return(view != 0 && view_get_is_passive(app, view->view_id)); +} + +static void +get_next_view_looped_primary_panels(Application_Links *app, View_Summary *view_start, Access_Flag access){ + View_ID new_id = get_next_view_looped_primary_panels(app, view_start->view_id, access); + get_view_summary(app, new_id, AccessAll, view_start); +} + +static void +get_prev_view_looped_primary_panels(Application_Links *app, View_Summary *view_start, Access_Flag access){ + View_ID new_id = get_prev_view_looped_primary_panels(app, view_start->view_id, access); + get_view_summary(app, new_id, AccessAll, view_start); +} + +static void +list__parameters(Application_Links *app, Heap *heap, Partition *scratch, String *strings, i32 count, Search_Range_Flag match_flags, View_Summary default_target_view){ + list__parameters(app, heap, scratch, strings, count, match_flags, default_target_view.view_id); +} + +static void +list_query__parameters(Application_Links *app, Heap *heap, Partition *scratch, b32 substrings, b32 case_insensitive, View_Summary default_target_view){ + list_query__parameters(app, heap, scratch, substrings, case_insensitive, default_target_view.view_id); +} + +static Buffer_ID +create_or_switch_to_buffer_by_name(Application_Links *app, char *name, i32 name_length, View_Summary default_target_view){ + return(create_or_switch_to_buffer_by_name(app, make_string(name, name_length), default_target_view.view_id)); +} + +static void +list_identifier__parameters(Application_Links *app, Heap *heap, Partition *scratch, b32 substrings, b32 case_insensitive, View_Summary default_target_view){ + list_identifier__parameters(app, heap, scratch, substrings, case_insensitive, default_target_view.view_id); +} + +static void +list_type_definition__parameters(Application_Links *app, Heap *heap, Partition *scratch, String str, View_Summary default_target_view){ + list_type_definition__parameters(app, heap, scratch, str, default_target_view.view_id); +} + #endif // BOTTOM diff --git a/4coder_base_commands.cpp b/4coder_base_commands.cpp index 9aaf1d75..fbc7dad5 100644 --- a/4coder_base_commands.cpp +++ b/4coder_base_commands.cpp @@ -1052,11 +1052,12 @@ CUSTOM_DOC("Queries the user for two strings, and replaces all occurences of the String r = replace.string; String w = with.string; - View_Summary view = get_active_view(app, AccessOpen); + View_ID view = 0; + get_active_view(app, AccessOpen, &view); Buffer_ID buffer_id = 0; - view_get_buffer(app, view.view_id, AccessOpen, &buffer_id); + view_get_buffer(app, view, AccessOpen, &buffer_id); - Range range = get_view_range(app, view.view_id); + Range range = get_view_range(app, view); i32 pos = range.min; i32 new_pos; @@ -1065,8 +1066,7 @@ CUSTOM_DOC("Queries the user for two strings, and replaces all occurences of the global_history_edit_group_begin(app); for (;new_pos + r.size <= range.end;){ buffer_replace_range(app, buffer_id, make_range(new_pos, new_pos + r.size), w); - refresh_view(app, &view); - range = get_view_range(app, view.view_id); + range = get_view_range(app, view); pos = new_pos + w.size; buffer_seek_string_forward(app, buffer_id, pos, 0, r.str, r.size, &new_pos); } @@ -1834,8 +1834,7 @@ record_get_new_cursor_position_redo(Application_Links *app, Buffer_ID buffer_id, return(record_get_new_cursor_position_redo(app, buffer_id, index, record)); } -// TODO(allen): switch to this being the default -CUSTOM_COMMAND_SIG(undo_this_buffer) +CUSTOM_COMMAND_SIG(undo) CUSTOM_DOC("Advances backwards through the undo history of the current buffer.") { View_ID view = 0; @@ -1851,8 +1850,7 @@ CUSTOM_DOC("Advances backwards through the undo history of the current buffer.") } } -// TODO(allen): switch to this being the default -CUSTOM_COMMAND_SIG(redo_this_buffer) +CUSTOM_COMMAND_SIG(redo) CUSTOM_DOC("Advances forwards through the undo history of the current buffer.") { View_ID view = 0; @@ -1870,7 +1868,7 @@ CUSTOM_DOC("Advances forwards through the undo history of the current buffer.") } } -CUSTOM_COMMAND_SIG(undo) +CUSTOM_COMMAND_SIG(undo_all_buffers) CUSTOM_DOC("Advances backward through the undo history in the buffer containing the most recent regular edit.") { Partition *scratch = &global_part; @@ -1949,7 +1947,7 @@ CUSTOM_DOC("Advances backward through the undo history in the buffer containing end_temp_memory(temp); } -CUSTOM_COMMAND_SIG(redo) +CUSTOM_COMMAND_SIG(redo_all_buffers) CUSTOM_DOC("Advances forward through the undo history in the buffer containing the most recent regular edit.") { Partition *scratch = &global_part; diff --git a/4coder_build_commands.cpp b/4coder_build_commands.cpp index c9306282..191d107b 100644 --- a/4coder_build_commands.cpp +++ b/4coder_build_commands.cpp @@ -146,10 +146,11 @@ execute_standard_build(Application_Links *app, View_ID view, Buffer_ID active_bu CUSTOM_COMMAND_SIG(build_search) CUSTOM_DOC("Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*.") { - View_Summary view = get_active_view(app, AccessAll); + View_ID view = 0; + get_active_view(app, AccessAll, &view); Buffer_ID buffer = 0; - view_get_buffer(app, view.view_id, AccessAll, &buffer); - execute_standard_build(app, view.view_id, buffer); + view_get_buffer(app, view, AccessAll, &buffer); + execute_standard_build(app, view, buffer); memset(&prev_location, 0, sizeof(prev_location)); lock_jump_buffer(make_lit_string("*compilation*")); } @@ -164,8 +165,8 @@ get_or_open_build_panel(Application_Links *app){ if (buffer != 0){ view = get_first_view_with_buffer(app, buffer); } - if (view != 0){ - open_build_footer_panel(app, &view); + if (view == 0){ + view = open_build_footer_panel(app); } return(view); } @@ -180,9 +181,10 @@ set_fancy_compilation_buffer_font(Application_Links *app){ CUSTOM_COMMAND_SIG(build_in_build_panel) CUSTOM_DOC("Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*. Puts the *compilation* buffer in a panel at the footer of the current view.") { - View_Summary view = get_active_view(app, AccessAll); + View_ID view = 0; + get_active_view(app, AccessAll, &view); Buffer_ID buffer = 0; - view_get_buffer(app, view.view_id, AccessAll, &buffer); + view_get_buffer(app, view, AccessAll, &buffer); View_ID build_view = get_or_open_build_panel(app); diff --git a/4coder_default_framework.cpp b/4coder_default_framework.cpp index c8b3c05d..918ed963 100644 --- a/4coder_default_framework.cpp +++ b/4coder_default_framework.cpp @@ -50,7 +50,7 @@ get_view_for_locked_jump_buffer(Application_Links *app){ //////////////////////////////// static void -new_view_settings(Application_Links *app, View_Summary *view){ +new_view_settings(Application_Links *app, View_ID view){ if (!global_config.use_scroll_bars){ view_set_setting(app, view, ViewSetting_ShowScrollbar, false); } @@ -75,36 +75,38 @@ view_get_is_passive(Application_Links *app, View_ID view_id){ return(is_passive != 0); } -static View_Summary -open_footer_panel(Application_Links *app, View_Summary *view){ - View_Summary special_view = open_view(app, view, ViewSplit_Bottom); - new_view_settings(app, &special_view); - view_set_split_pixel_size(app, &special_view, (i32)(special_view.line_height*20.f)); - view_set_passive(app, special_view.view_id, true); +static View_ID +open_footer_panel(Application_Links *app, View_ID view){ + View_ID special_view = open_view(app, view, ViewSplit_Bottom); + new_view_settings(app, special_view); + Buffer_ID buffer = 0; + view_get_buffer(app, special_view, AccessAll, &buffer); + Face_ID face_id = 0; + get_face_id(app, buffer, &face_id); + Face_Metrics metrics = {}; + get_face_metrics(app, face_id, &metrics); + view_set_split_pixel_size(app, special_view, (i32)(metrics.line_height*20.f)); + view_set_passive(app, special_view, true); return(special_view); } static void close_build_footer_panel(Application_Links *app){ - View_Summary special_view = get_view(app, build_footer_panel_view_id, AccessAll); - if (special_view.exists){ - close_view(app, &special_view); + if (build_footer_panel_view_id != 0){ + view_close(app, build_footer_panel_view_id); + build_footer_panel_view_id = 0; } - build_footer_panel_view_id = 0; } -static b32 -open_build_footer_panel(Application_Links *app, View_ID *view_id_out){ - View_Summary special_view = {}; - get_view_summary(app, build_footer_panel_view_id, AccessAll, &special_view); - if (!special_view.exists){ - View_Summary view = get_active_view(app, AccessAll); - special_view = open_footer_panel(app, &view); - set_active_view(app, &view); - build_footer_panel_view_id = special_view.view_id; +static View_ID +open_build_footer_panel(Application_Links *app){ + if (build_footer_panel_view_id == 0){ + View_ID view = 0; + get_active_view(app, AccessAll, &view); + build_footer_panel_view_id = open_footer_panel(app, view); + view_set_active(app, view); } - *view_id_out = build_footer_panel_view_id; - return(true); + return(build_footer_panel_view_id); } static View_ID @@ -131,47 +133,12 @@ get_prev_view_looped_primary_panels(Application_Links *app, View_ID start_view_i return(view_id); } -//// - -static void -view_set_passive(Application_Links *app, View_Summary *view, b32 value){ +static View_ID +get_next_view_after_active(Application_Links *app, Access_Flag access){ + View_ID view = 0; + get_active_view(app, access, &view); if (view != 0){ - view_set_passive(app, view->view_id, value); - } -} - -static b32 -view_get_is_passive(Application_Links *app, View_Summary *view){ - return(view != 0 && view_get_is_passive(app, view->view_id)); -} - -static View_Summary -open_build_footer_panel(Application_Links *app){ - View_Summary summary = {}; - View_ID build_footer_id = 0; - if (open_build_footer_panel(app, &build_footer_id)){ - get_view_summary(app, build_footer_id, AccessAll, &summary); - } - return(summary); -} - -static void -get_next_view_looped_primary_panels(Application_Links *app, View_Summary *view_start, Access_Flag access){ - View_ID new_id = get_next_view_looped_primary_panels(app, view_start->view_id, access); - get_view_summary(app, new_id, AccessAll, view_start); -} - -static void -get_prev_view_looped_primary_panels(Application_Links *app, View_Summary *view_start, Access_Flag access){ - View_ID new_id = get_prev_view_looped_primary_panels(app, view_start->view_id, access); - get_view_summary(app, new_id, AccessAll, view_start); -} - -static View_Summary -get_next_view_after_active(Application_Links *app, u32 access){ - View_Summary view = get_active_view(app, access); - if (view.exists){ - get_next_view_looped_primary_panels(app, &view, access); + view = get_next_view_looped_primary_panels(app, view, access); } return(view); } @@ -236,39 +203,47 @@ view_buffer_set(Application_Links *app, Buffer_ID *buffers, i32 *positions, i32 CUSTOM_COMMAND_SIG(change_active_panel) CUSTOM_DOC("Change the currently active panel, moving to the panel with the next highest view_id.") { - View_Summary view = get_active_view(app, AccessAll); - get_next_view_looped_primary_panels(app, &view, AccessAll); - if (view.exists){ - set_active_view(app, &view); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + view = get_next_view_looped_primary_panels(app, view, AccessAll); + if (view != 0){ + view_set_active(app, view); } } CUSTOM_COMMAND_SIG(change_active_panel_backwards) CUSTOM_DOC("Change the currently active panel, moving to the panel with the next lowest view_id.") { - View_Summary view = get_active_view(app, AccessAll); - get_prev_view_looped_primary_panels(app, &view, AccessAll); - if (view.exists){ - set_active_view(app, &view); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + view = get_prev_view_looped_primary_panels(app, view, AccessAll); + if (view != 0){ + view_set_active(app, view); } } CUSTOM_COMMAND_SIG(open_panel_vsplit) CUSTOM_DOC("Create a new panel by vertically splitting the active panel.") { - View_Summary view = get_active_view(app, AccessAll); - View_Summary new_view = open_view(app, &view, ViewSplit_Right); - new_view_settings(app, &new_view); - view_set_buffer(app, &new_view, view.buffer_id, 0); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + View_ID new_view = open_view(app, view, ViewSplit_Right); + new_view_settings(app, new_view); + Buffer_ID buffer = 0; + view_get_buffer(app, view, AccessAll, &buffer); + view_set_buffer(app, new_view, buffer, 0); } CUSTOM_COMMAND_SIG(open_panel_hsplit) CUSTOM_DOC("Create a new panel by horizontally splitting the active panel.") { - View_Summary view = get_active_view(app, AccessAll); - View_Summary new_view = open_view(app, &view, ViewSplit_Bottom); - new_view_settings(app, &new_view); - view_set_buffer(app, &new_view, view.buffer_id, 0); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + View_ID new_view = open_view(app, view, ViewSplit_Bottom); + new_view_settings(app, new_view); + Buffer_ID buffer = 0; + view_get_buffer(app, view, AccessAll, &buffer); + view_set_buffer(app, new_view, buffer, 0); } //////////////////////////////// @@ -276,14 +251,13 @@ CUSTOM_DOC("Create a new panel by horizontally splitting the active panel.") // NOTE(allen): Credits to nj/FlyingSolomon for authoring the original version of this helper. static Buffer_ID -create_or_switch_to_buffer_by_name(Application_Links *app, char *name, i32 name_length, View_Summary default_target_view){ - String name_string = make_string(name, name_length); +create_or_switch_to_buffer_by_name(Application_Links *app, String name_string, View_ID default_target_view){ Buffer_ID search_buffer = 0; get_buffer_by_name(app, name_string, AccessAll, &search_buffer); if (search_buffer != 0){ buffer_set_setting(app, search_buffer, BufferSetting_ReadOnly, true); - View_ID target_view = default_target_view.view_id; + View_ID target_view = default_target_view; View_ID view_with_buffer_already_open = get_first_view_with_buffer(app, search_buffer); if (view_with_buffer_already_open != 0){ @@ -306,8 +280,8 @@ create_or_switch_to_buffer_by_name(Application_Links *app, char *name, i32 name_ buffer_set_setting(app, search_buffer, BufferSetting_Unimportant, true); buffer_set_setting(app, search_buffer, BufferSetting_ReadOnly, true); buffer_set_setting(app, search_buffer, BufferSetting_WrapLine, false); - view_set_buffer(app, &default_target_view, search_buffer, 0); - set_active_view(app, &default_target_view); + view_set_buffer(app, default_target_view, search_buffer, 0); + view_set_active(app, default_target_view); } return(search_buffer); @@ -471,17 +445,19 @@ default_4coder_side_by_side_panels(Application_Links *app, Buffer_Identifier lef Buffer_ID right_id = buffer_identifier_to_id(app, right_buffer); // Left Panel - View_Summary view = get_active_view(app, AccessAll); - new_view_settings(app, &view); - view_set_buffer(app, &view, left_id, 0); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + new_view_settings(app, view); + view_set_buffer(app, view, left_id, 0); // Right Panel open_panel_vsplit(app); - View_Summary right_view = get_active_view(app, AccessAll); - view_set_buffer(app, &right_view, right_id, 0); + View_ID right_view = 0; + get_active_view(app, AccessAll, &right_view); + view_set_buffer(app, right_view, right_id, 0); // Restore Active to Left - set_active_view(app, &view); + view_set_active(app, view); } static void @@ -512,10 +488,10 @@ default_4coder_side_by_side_panels(Application_Links *app){ static void default_4coder_one_panel(Application_Links *app, Buffer_Identifier buffer){ Buffer_ID id = buffer_identifier_to_id(app, buffer); - - View_Summary view = get_active_view(app, AccessAll); - new_view_settings(app, &view); - view_set_buffer(app, &view, id, 0); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + new_view_settings(app, view); + view_set_buffer(app, view, id, 0); } static void diff --git a/4coder_function_list.cpp b/4coder_function_list.cpp index 6808080d..ac401e15 100644 --- a/4coder_function_list.cpp +++ b/4coder_function_list.cpp @@ -308,8 +308,9 @@ list_all_functions(Application_Links *app, Partition *part, Buffer_ID optional_t buffered_write_stream_flush(app, &buffered_write_stream); - View_Summary view = get_active_view(app, AccessAll); - view_set_buffer(app, &view, decls_buffer, 0); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + view_set_buffer(app, view, decls_buffer, 0); lock_jump_buffer(decls_name.str, decls_name.size); @@ -320,9 +321,10 @@ list_all_functions(Application_Links *app, Partition *part, Buffer_ID optional_t CUSTOM_COMMAND_SIG(list_all_functions_current_buffer) CUSTOM_DOC("Creates a jump list of lines of the current buffer that appear to define or declare functions.") { - View_Summary view = get_active_view(app, AccessProtected); + View_ID view = 0; + get_active_view(app, AccessProtected, &view); Buffer_ID buffer = 0; - view_get_buffer(app, view.view_id, AccessProtected, &buffer); + view_get_buffer(app, view, AccessProtected, &buffer); if (buffer_exists(app, buffer)){ list_all_functions(app, &global_part, buffer); } diff --git a/4coder_generated/command_metadata.h b/4coder_generated/command_metadata.h index 465f0929..5203bdbd 100644 --- a/4coder_generated/command_metadata.h +++ b/4coder_generated/command_metadata.h @@ -160,7 +160,7 @@ CUSTOM_COMMAND_SIG(query_replace); CUSTOM_COMMAND_SIG(query_replace_identifier); CUSTOM_COMMAND_SIG(query_replace_selection); CUSTOM_COMMAND_SIG(redo); -CUSTOM_COMMAND_SIG(redo_this_buffer); +CUSTOM_COMMAND_SIG(redo_all_buffers); CUSTOM_COMMAND_SIG(remap_interactive); CUSTOM_COMMAND_SIG(rename_file_query); CUSTOM_COMMAND_SIG(rename_parameter); @@ -229,7 +229,7 @@ CUSTOM_COMMAND_SIG(toggle_show_whitespace); CUSTOM_COMMAND_SIG(toggle_virtual_whitespace); CUSTOM_COMMAND_SIG(uncomment_line); CUSTOM_COMMAND_SIG(undo); -CUSTOM_COMMAND_SIG(undo_this_buffer); +CUSTOM_COMMAND_SIG(undo_all_buffers); CUSTOM_COMMAND_SIG(view_buffer_other_panel); CUSTOM_COMMAND_SIG(view_jump_list_with_lister); CUSTOM_COMMAND_SIG(word_complete); @@ -255,26 +255,26 @@ int32_t source_name_len; int32_t line_number; }; static Command_Metadata fcoder_metacmd_table[234] = { -{ PROC_LINKS(allow_mouse, 0), "allow_mouse", 11, "Shows the mouse and causes all mouse input to be processed normally.", 68, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 336 }, +{ PROC_LINKS(allow_mouse, 0), "allow_mouse", 11, "Shows the mouse and causes all mouse input to be processed normally.", 68, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 310 }, { PROC_LINKS(auto_tab_line_at_cursor, 0), "auto_tab_line_at_cursor", 23, "Auto-indents the line on which the cursor sits.", 47, "w:\\4ed\\code\\4coder_auto_indent.cpp", 34, 624 }, { PROC_LINKS(auto_tab_range, 0), "auto_tab_range", 14, "Auto-indents the range between the cursor and the mark.", 55, "w:\\4ed\\code\\4coder_auto_indent.cpp", 34, 637 }, { PROC_LINKS(auto_tab_whole_file, 0), "auto_tab_whole_file", 19, "Audo-indents the entire current buffer.", 39, "w:\\4ed\\code\\4coder_auto_indent.cpp", 34, 612 }, { PROC_LINKS(backspace_char, 0), "backspace_char", 14, "Deletes the character to the left of the cursor.", 48, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 109 }, { PROC_LINKS(backspace_word, 0), "backspace_word", 14, "Delete characters between the cursor position and the first alphanumeric boundary to the left.", 94, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1241 }, { PROC_LINKS(basic_change_active_panel, 0), "basic_change_active_panel", 25, "Change the currently active panel, moving to the panel with the next highest view_id. Will not skipe the build panel if it is open.", 132, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 573 }, -{ PROC_LINKS(build_in_build_panel, 0), "build_in_build_panel", 20, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*. Puts the *compilation* buffer in a panel at the footer of the current view.", 230, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 180 }, +{ PROC_LINKS(build_in_build_panel, 0), "build_in_build_panel", 20, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*. Puts the *compilation* buffer in a panel at the footer of the current view.", 230, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 181 }, { PROC_LINKS(build_search, 0), "build_search", 12, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*.", 153, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 146 }, { PROC_LINKS(center_view, 0), "center_view", 11, "Centers the view vertically on the line on which the cursor sits.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 170 }, -{ PROC_LINKS(change_active_panel, 0), "change_active_panel", 19, "Change the currently active panel, moving to the panel with the next highest view_id.", 85, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 236 }, -{ PROC_LINKS(change_active_panel_backwards, 0), "change_active_panel_backwards", 29, "Change the currently active panel, moving to the panel with the next lowest view_id.", 84, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 246 }, -{ PROC_LINKS(change_to_build_panel, 0), "change_to_build_panel", 21, "If the special build panel is open, makes the build panel the active panel.", 75, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 202 }, +{ PROC_LINKS(change_active_panel, 0), "change_active_panel", 19, "Change the currently active panel, moving to the panel with the next highest view_id.", 85, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 203 }, +{ PROC_LINKS(change_active_panel_backwards, 0), "change_active_panel_backwards", 29, "Change the currently active panel, moving to the panel with the next lowest view_id.", 84, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 214 }, +{ PROC_LINKS(change_to_build_panel, 0), "change_to_build_panel", 21, "If the special build panel is open, makes the build panel the active panel.", 75, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 204 }, { PROC_LINKS(clean_all_lines, 0), "clean_all_lines", 15, "Removes trailing whitespace from all lines in the current buffer.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 503 }, { PROC_LINKS(click_set_cursor, 0), "click_set_cursor", 16, "Sets the cursor position to the mouse position.", 47, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 232 }, { PROC_LINKS(click_set_cursor_and_mark, 0), "click_set_cursor_and_mark", 25, "Sets the cursor position and mark to the mouse position.", 56, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 213 }, { PROC_LINKS(click_set_cursor_if_lbutton, 0), "click_set_cursor_if_lbutton", 27, "If the mouse left button is pressed, sets the cursor position to the mouse position.", 84, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 249 }, { PROC_LINKS(click_set_mark, 0), "click_set_mark", 14, "Sets the mark position to the mouse position.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 268 }, { PROC_LINKS(close_all_code, 0), "close_all_code", 14, "Closes any buffer with a filename ending with an extension configured to be recognized as a code file type.", 107, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1062 }, -{ PROC_LINKS(close_build_panel, 0), "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 196 }, +{ PROC_LINKS(close_build_panel, 0), "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 198 }, { PROC_LINKS(close_panel, 0), "close_panel", 11, "Closes the currently active panel if it is not the only panel open.", 67, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 582 }, { PROC_LINKS(command_lister, 0), "command_lister", 14, "Opens an interactive list of all registered commands.", 53, "w:\\4ed\\code\\4coder_lists.cpp", 28, 1047 }, { PROC_LINKS(comment_line, 0), "comment_line", 12, "Insert '//' at the beginning of the line after leading whitespace.", 66, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 143 }, @@ -293,27 +293,27 @@ static Command_Metadata fcoder_metacmd_table[234] = { { PROC_LINKS(duplicate_line, 0), "duplicate_line", 14, "Create a copy of the line on which the cursor sits.", 51, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1516 }, { PROC_LINKS(eol_dosify, 0), "eol_dosify", 10, "Puts the buffer in DOS line ending mode.", 40, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 749 }, { PROC_LINKS(eol_nixify, 0), "eol_nixify", 10, "Puts the buffer in NIX line ending mode.", 40, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 759 }, -{ PROC_LINKS(execute_any_cli, 0), "execute_any_cli", 15, "Queries for an output buffer name and system command, runs the system command as a CLI and prints the output to the specified buffer.", 133, "w:\\4ed\\code\\4coder_system_command.cpp", 37, 23 }, +{ PROC_LINKS(execute_any_cli, 0), "execute_any_cli", 15, "Queries for an output buffer name and system command, runs the system command as a CLI and prints the output to the specified buffer.", 133, "w:\\4ed\\code\\4coder_system_command.cpp", 37, 22 }, { PROC_LINKS(execute_previous_cli, 0), "execute_previous_cli", 20, "If the command execute_any_cli has already been used, this will execute a CLI reusing the most recent buffer name and command.", 126, "w:\\4ed\\code\\4coder_system_command.cpp", 37, 7 }, { PROC_LINKS(exit_4coder, 0), "exit_4coder", 11, "Attempts to close 4coder.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 769 }, { PROC_LINKS(goto_beginning_of_file, 0), "goto_beginning_of_file", 22, "Sets the cursor to the beginning of the file.", 45, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1155 }, { PROC_LINKS(goto_end_of_file, 0), "goto_end_of_file", 16, "Sets the cursor to the end of the file.", 39, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1164 }, -{ PROC_LINKS(goto_first_jump_direct, 0), "goto_first_jump_direct", 22, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 83 }, -{ PROC_LINKS(goto_first_jump_same_panel_sticky, 0), "goto_first_jump_same_panel_sticky", 33, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer and views the buffer in the panel where the jump list was.", 153, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 562 }, -{ PROC_LINKS(goto_first_jump_sticky, 0), "goto_first_jump_sticky", 22, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 544 }, +{ PROC_LINKS(goto_first_jump_direct, 0), "goto_first_jump_direct", 22, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 97 }, +{ PROC_LINKS(goto_first_jump_same_panel_sticky, 0), "goto_first_jump_same_panel_sticky", 33, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer and views the buffer in the panel where the jump list was.", 153, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 582 }, +{ PROC_LINKS(goto_first_jump_sticky, 0), "goto_first_jump_sticky", 22, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 564 }, { PROC_LINKS(goto_jump_at_cursor_direct, 0), "goto_jump_at_cursor_direct", 26, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in another view and changes the active panel to the view containing the jump.", 187, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 8 }, -{ PROC_LINKS(goto_jump_at_cursor_same_panel_direct, 0), "goto_jump_at_cursor_same_panel_direct", 37, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list..", 168, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 29 }, -{ PROC_LINKS(goto_jump_at_cursor_same_panel_sticky, 0), "goto_jump_at_cursor_same_panel_sticky", 37, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list.", 167, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 374 }, +{ PROC_LINKS(goto_jump_at_cursor_same_panel_direct, 0), "goto_jump_at_cursor_same_panel_direct", 37, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list..", 168, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 36 }, +{ PROC_LINKS(goto_jump_at_cursor_same_panel_sticky, 0), "goto_jump_at_cursor_same_panel_sticky", 37, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list.", 167, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 383 }, { PROC_LINKS(goto_jump_at_cursor_sticky, 0), "goto_jump_at_cursor_sticky", 26, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in another view and changes the active panel to the view containing the jump.", 187, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 346 }, { PROC_LINKS(goto_line, 0), "goto_line", 9, "Queries the user for a number, and jumps the cursor to the corresponding line.", 78, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 777 }, -{ PROC_LINKS(goto_next_jump_direct, 0), "goto_next_jump_direct", 21, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 47 }, -{ PROC_LINKS(goto_next_jump_no_skips_direct, 0), "goto_next_jump_no_skips_direct", 30, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 65 }, -{ PROC_LINKS(goto_next_jump_no_skips_sticky, 0), "goto_next_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 509 }, -{ PROC_LINKS(goto_next_jump_sticky, 0), "goto_next_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 475 }, -{ PROC_LINKS(goto_prev_jump_direct, 0), "goto_prev_jump_direct", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 56 }, -{ PROC_LINKS(goto_prev_jump_no_skips_direct, 0), "goto_prev_jump_no_skips_direct", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 74 }, -{ PROC_LINKS(goto_prev_jump_no_skips_sticky, 0), "goto_prev_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 529 }, -{ PROC_LINKS(goto_prev_jump_sticky, 0), "goto_prev_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 495 }, +{ PROC_LINKS(goto_next_jump_direct, 0), "goto_next_jump_direct", 21, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 61 }, +{ PROC_LINKS(goto_next_jump_no_skips_direct, 0), "goto_next_jump_no_skips_direct", 30, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 79 }, +{ PROC_LINKS(goto_next_jump_no_skips_sticky, 0), "goto_next_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 529 }, +{ PROC_LINKS(goto_next_jump_sticky, 0), "goto_next_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 495 }, +{ PROC_LINKS(goto_prev_jump_direct, 0), "goto_prev_jump_direct", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 70 }, +{ PROC_LINKS(goto_prev_jump_no_skips_direct, 0), "goto_prev_jump_no_skips_direct", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 88 }, +{ PROC_LINKS(goto_prev_jump_no_skips_sticky, 0), "goto_prev_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 549 }, +{ PROC_LINKS(goto_prev_jump_sticky, 0), "goto_prev_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 515 }, { PROC_LINKS(hide_filebar, 0), "hide_filebar", 12, "Sets the current view to hide it's filebar.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 616 }, { PROC_LINKS(hide_scrollbar, 0), "hide_scrollbar", 14, "Sets the current view to hide it's scrollbar.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 600 }, { PROC_LINKS(if0_off, 0), "if0_off", 7, "Surround the range between the cursor and mark with an '#if 0' and an '#endif'", 78, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 84 }, @@ -327,20 +327,20 @@ static Command_Metadata fcoder_metacmd_table[234] = { { PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1749 }, { PROC_LINKS(kill_rect, 0), "kill_rect", 9, "Delete characters in a rectangular region. Range testing is done by unwrapped-xy coordinates.", 93, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 50 }, { PROC_LINKS(left_adjust_view, 0), "left_adjust_view", 16, "Sets the left size of the view near the x position of the cursor.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 188 }, -{ PROC_LINKS(list_all_functions_all_buffers, 0), "list_all_functions_all_buffers", 30, "Creates a jump list of lines from all buffers that appear to define or declare functions.", 89, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 345 }, -{ PROC_LINKS(list_all_functions_all_buffers_lister, 0), "list_all_functions_all_buffers_lister", 37, "Creates a lister of locations that look like function definitions and declarations all buffers.", 95, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 351 }, -{ PROC_LINKS(list_all_functions_current_buffer, 0), "list_all_functions_current_buffer", 33, "Creates a jump list of lines of the current buffer that appear to define or declare functions.", 94, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 320 }, -{ PROC_LINKS(list_all_functions_current_buffer_lister, 0), "list_all_functions_current_buffer_lister", 40, "Creates a lister of locations that look like function definitions and declarations in the buffer.", 97, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 331 }, -{ PROC_LINKS(list_all_locations, 0), "list_all_locations", 18, "Queries the user for a string and lists all exact case-sensitive matches found in all open buffers.", 99, "w:\\4ed\\code\\4coder_search.cpp", 29, 801 }, -{ PROC_LINKS(list_all_locations_case_insensitive, 0), "list_all_locations_case_insensitive", 35, "Queries the user for a string and lists all exact case-insensitive matches found in all open buffers.", 101, "w:\\4ed\\code\\4coder_search.cpp", 29, 815 }, -{ PROC_LINKS(list_all_locations_of_identifier, 0), "list_all_locations_of_identifier", 32, "Reads a token or word under the cursor and lists all exact case-sensitive mathces in all open buffers.", 102, "w:\\4ed\\code\\4coder_search.cpp", 29, 829 }, -{ PROC_LINKS(list_all_locations_of_identifier_case_insensitive, 0), "list_all_locations_of_identifier_case_insensitive", 49, "Reads a token or word under the cursor and lists all exact case-insensitive mathces in all open buffers.", 104, "w:\\4ed\\code\\4coder_search.cpp", 29, 836 }, -{ PROC_LINKS(list_all_locations_of_selection, 0), "list_all_locations_of_selection", 31, "Reads the string in the selected range and lists all exact case-sensitive mathces in all open buffers.", 102, "w:\\4ed\\code\\4coder_search.cpp", 29, 843 }, -{ PROC_LINKS(list_all_locations_of_selection_case_insensitive, 0), "list_all_locations_of_selection_case_insensitive", 48, "Reads the string in the selected range and lists all exact case-insensitive mathces in all open buffers.", 104, "w:\\4ed\\code\\4coder_search.cpp", 29, 850 }, -{ PROC_LINKS(list_all_locations_of_type_definition, 0), "list_all_locations_of_type_definition", 37, "Queries user for string, lists all locations of strings that appear to define a type whose name matches the input string.", 121, "w:\\4ed\\code\\4coder_search.cpp", 29, 857 }, -{ PROC_LINKS(list_all_locations_of_type_definition_of_identifier, 0), "list_all_locations_of_type_definition_of_identifier", 51, "Reads a token or word under the cursor and lists all locations of strings that appear to define a type whose name matches it.", 125, "w:\\4ed\\code\\4coder_search.cpp", 29, 868 }, -{ PROC_LINKS(list_all_substring_locations, 0), "list_all_substring_locations", 28, "Queries the user for a string and lists all case-sensitive substring matches found in all open buffers.", 103, "w:\\4ed\\code\\4coder_search.cpp", 29, 808 }, -{ PROC_LINKS(list_all_substring_locations_case_insensitive, 0), "list_all_substring_locations_case_insensitive", 45, "Queries the user for a string and lists all case-insensitive substring matches found in all open buffers.", 105, "w:\\4ed\\code\\4coder_search.cpp", 29, 822 }, +{ PROC_LINKS(list_all_functions_all_buffers, 0), "list_all_functions_all_buffers", 30, "Creates a jump list of lines from all buffers that appear to define or declare functions.", 89, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 347 }, +{ PROC_LINKS(list_all_functions_all_buffers_lister, 0), "list_all_functions_all_buffers_lister", 37, "Creates a lister of locations that look like function definitions and declarations all buffers.", 95, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 353 }, +{ PROC_LINKS(list_all_functions_current_buffer, 0), "list_all_functions_current_buffer", 33, "Creates a jump list of lines of the current buffer that appear to define or declare functions.", 94, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 321 }, +{ PROC_LINKS(list_all_functions_current_buffer_lister, 0), "list_all_functions_current_buffer_lister", 40, "Creates a lister of locations that look like function definitions and declarations in the buffer.", 97, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 333 }, +{ PROC_LINKS(list_all_locations, 0), "list_all_locations", 18, "Queries the user for a string and lists all exact case-sensitive matches found in all open buffers.", 99, "w:\\4ed\\code\\4coder_search.cpp", 29, 792 }, +{ PROC_LINKS(list_all_locations_case_insensitive, 0), "list_all_locations_case_insensitive", 35, "Queries the user for a string and lists all exact case-insensitive matches found in all open buffers.", 101, "w:\\4ed\\code\\4coder_search.cpp", 29, 806 }, +{ PROC_LINKS(list_all_locations_of_identifier, 0), "list_all_locations_of_identifier", 32, "Reads a token or word under the cursor and lists all exact case-sensitive mathces in all open buffers.", 102, "w:\\4ed\\code\\4coder_search.cpp", 29, 820 }, +{ PROC_LINKS(list_all_locations_of_identifier_case_insensitive, 0), "list_all_locations_of_identifier_case_insensitive", 49, "Reads a token or word under the cursor and lists all exact case-insensitive mathces in all open buffers.", 104, "w:\\4ed\\code\\4coder_search.cpp", 29, 827 }, +{ PROC_LINKS(list_all_locations_of_selection, 0), "list_all_locations_of_selection", 31, "Reads the string in the selected range and lists all exact case-sensitive mathces in all open buffers.", 102, "w:\\4ed\\code\\4coder_search.cpp", 29, 834 }, +{ PROC_LINKS(list_all_locations_of_selection_case_insensitive, 0), "list_all_locations_of_selection_case_insensitive", 48, "Reads the string in the selected range and lists all exact case-insensitive mathces in all open buffers.", 104, "w:\\4ed\\code\\4coder_search.cpp", 29, 841 }, +{ PROC_LINKS(list_all_locations_of_type_definition, 0), "list_all_locations_of_type_definition", 37, "Queries user for string, lists all locations of strings that appear to define a type whose name matches the input string.", 121, "w:\\4ed\\code\\4coder_search.cpp", 29, 848 }, +{ PROC_LINKS(list_all_locations_of_type_definition_of_identifier, 0), "list_all_locations_of_type_definition_of_identifier", 51, "Reads a token or word under the cursor and lists all locations of strings that appear to define a type whose name matches it.", 125, "w:\\4ed\\code\\4coder_search.cpp", 29, 859 }, +{ PROC_LINKS(list_all_substring_locations, 0), "list_all_substring_locations", 28, "Queries the user for a string and lists all case-sensitive substring matches found in all open buffers.", 103, "w:\\4ed\\code\\4coder_search.cpp", 29, 799 }, +{ PROC_LINKS(list_all_substring_locations_case_insensitive, 0), "list_all_substring_locations_case_insensitive", 45, "Queries the user for a string and lists all case-insensitive substring matches found in all open buffers.", 105, "w:\\4ed\\code\\4coder_search.cpp", 29, 813 }, { PROC_LINKS(lister__activate, 0), "lister__activate", 16, "A lister mode command that activates the list's action on the highlighted item.", 79, "w:\\4ed\\code\\4coder_lists.cpp", 28, 16 }, { PROC_LINKS(lister__backspace_text_field, 0), "lister__backspace_text_field", 28, "A lister mode command that dispatches to the lister's backspace text field handler.", 83, "w:\\4ed\\code\\4coder_lists.cpp", 28, 44 }, { PROC_LINKS(lister__backspace_text_field__default, 0), "lister__backspace_text_field__default", 37, "A lister mode command that backspaces one character from the text field.", 72, "w:\\4ed\\code\\4coder_lists.cpp", 28, 157 }, @@ -360,12 +360,12 @@ static Command_Metadata fcoder_metacmd_table[234] = { { PROC_LINKS(lister__write_character__fixed_list, 0), "lister__write_character__fixed_list", 35, "A lister mode command that handles input for the fixed sure to kill list.", 73, "w:\\4ed\\code\\4coder_lists.cpp", 28, 273 }, { PROC_LINKS(load_project, 0), "load_project", 12, "Looks for a project.4coder file in the current directory and tries to load it. Looks in parent directories until a project file is found or there are no more parents.", 167, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1085 }, { PROC_LINKS(make_directory_query, 0), "make_directory_query", 20, "Queries the user for a name and creates a new directory with the given name.", 76, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1396 }, -{ PROC_LINKS(miblo_decrement_basic, 0), "miblo_decrement_basic", 21, "Decrement an integer under the cursor by one.", 45, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 113 }, -{ PROC_LINKS(miblo_decrement_time_stamp, 0), "miblo_decrement_time_stamp", 26, "Decrement a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 391 }, -{ PROC_LINKS(miblo_decrement_time_stamp_minute, 0), "miblo_decrement_time_stamp_minute", 33, "Decrement a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 403 }, +{ PROC_LINKS(miblo_decrement_basic, 0), "miblo_decrement_basic", 21, "Decrement an integer under the cursor by one.", 45, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 116 }, +{ PROC_LINKS(miblo_decrement_time_stamp, 0), "miblo_decrement_time_stamp", 26, "Decrement a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 400 }, +{ PROC_LINKS(miblo_decrement_time_stamp_minute, 0), "miblo_decrement_time_stamp_minute", 33, "Decrement a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 412 }, { PROC_LINKS(miblo_increment_basic, 0), "miblo_increment_basic", 21, "Increment an integer under the cursor by one.", 45, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 97 }, -{ PROC_LINKS(miblo_increment_time_stamp, 0), "miblo_increment_time_stamp", 26, "Increment a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 385 }, -{ PROC_LINKS(miblo_increment_time_stamp_minute, 0), "miblo_increment_time_stamp_minute", 33, "Increment a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 397 }, +{ PROC_LINKS(miblo_increment_time_stamp, 0), "miblo_increment_time_stamp", 26, "Increment a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 394 }, +{ PROC_LINKS(miblo_increment_time_stamp_minute, 0), "miblo_increment_time_stamp_minute", 33, "Increment a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 406 }, { PROC_LINKS(mouse_wheel_change_face_size, 0), "mouse_wheel_change_face_size", 28, "Reads the state of the mouse wheel and uses it to either increase or decrease the face size.", 92, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 704 }, { PROC_LINKS(mouse_wheel_scroll, 0), "mouse_wheel_scroll", 18, "Reads the scroll wheel value from the mouse state and scrolls accordingly.", 74, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 285 }, { PROC_LINKS(move_down, 0), "move_down", 9, "Moves the cursor down one line.", 31, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 367 }, @@ -378,20 +378,20 @@ static Command_Metadata fcoder_metacmd_table[234] = { { PROC_LINKS(move_up, 0), "move_up", 7, "Moves the cursor up one line.", 29, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 361 }, { PROC_LINKS(move_up_10, 0), "move_up_10", 10, "Moves the cursor up ten lines.", 30, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 373 }, { PROC_LINKS(multi_line_edit, 0), "multi_line_edit", 15, "Begin multi-line mode. In multi-line mode characters are inserted at every line between the mark and cursor. All characters are inserted at the same character offset into the line. This mode uses line_char coordinates.", 221, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 136 }, -{ PROC_LINKS(newline_or_goto_position_direct, 0), "newline_or_goto_position_direct", 31, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 100 }, -{ PROC_LINKS(newline_or_goto_position_same_panel_direct, 0), "newline_or_goto_position_same_panel_direct", 42, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 114 }, -{ PROC_LINKS(newline_or_goto_position_same_panel_sticky, 0), "newline_or_goto_position_same_panel_sticky", 42, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 599 }, -{ PROC_LINKS(newline_or_goto_position_sticky, 0), "newline_or_goto_position_sticky", 31, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 585 }, +{ PROC_LINKS(newline_or_goto_position_direct, 0), "newline_or_goto_position_direct", 31, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 114 }, +{ PROC_LINKS(newline_or_goto_position_same_panel_direct, 0), "newline_or_goto_position_same_panel_direct", 42, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 129 }, +{ PROC_LINKS(newline_or_goto_position_same_panel_sticky, 0), "newline_or_goto_position_same_panel_sticky", 42, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 620 }, +{ PROC_LINKS(newline_or_goto_position_sticky, 0), "newline_or_goto_position_sticky", 31, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 605 }, { PROC_LINKS(open_all_code, 0), "open_all_code", 13, "Open all code in the current directory. File types are determined by extensions. An extension is considered code based on the extensions specified in 4coder.config.", 164, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1069 }, { PROC_LINKS(open_all_code_recursive, 0), "open_all_code_recursive", 23, "Works as open_all_code but also runs in all subdirectories.", 59, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1076 }, { PROC_LINKS(open_file_in_quotes, 0), "open_file_in_quotes", 19, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file.", 94, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1630 }, -{ PROC_LINKS(open_in_other, 0), "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 2062 }, +{ PROC_LINKS(open_in_other, 0), "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 2060 }, { PROC_LINKS(open_long_braces, 0), "open_long_braces", 16, "At the cursor, insert a '{' and '}' separated by a blank line.", 62, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 60 }, { PROC_LINKS(open_long_braces_break, 0), "open_long_braces_break", 22, "At the cursor, insert a '{' and '}break;' separated by a blank line.", 68, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 76 }, { PROC_LINKS(open_long_braces_semicolon, 0), "open_long_braces_semicolon", 26, "At the cursor, insert a '{' and '};' separated by a blank line.", 63, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 68 }, { PROC_LINKS(open_matching_file_cpp, 0), "open_matching_file_cpp", 22, "If the current file is a *.cpp or *.h, attempts to open the corresponding *.h or *.cpp file in the other view.", 110, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1674 }, -{ PROC_LINKS(open_panel_hsplit, 0), "open_panel_hsplit", 17, "Create a new panel by horizontally splitting the active panel.", 62, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 265 }, -{ PROC_LINKS(open_panel_vsplit, 0), "open_panel_vsplit", 17, "Create a new panel by vertically splitting the active panel.", 60, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 256 }, +{ PROC_LINKS(open_panel_hsplit, 0), "open_panel_hsplit", 17, "Create a new panel by horizontally splitting the active panel.", 62, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 237 }, +{ PROC_LINKS(open_panel_vsplit, 0), "open_panel_vsplit", 17, "Create a new panel by vertically splitting the active panel.", 60, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 225 }, { PROC_LINKS(page_down, 0), "page_down", 9, "Scrolls the view down one view height and moves the cursor down one view height.", 80, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 408 }, { PROC_LINKS(page_up, 0), "page_up", 7, "Scrolls the view up one view height and moves the cursor up one view height.", 76, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 399 }, { PROC_LINKS(paste, 0), "paste", 5, "At the cursor, insert the text at the top of the clipboard.", 59, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 50 }, @@ -405,9 +405,9 @@ static Command_Metadata fcoder_metacmd_table[234] = { { PROC_LINKS(query_replace, 0), "query_replace", 13, "Queries the user for two strings, and incrementally replaces every occurence of the first string with the second string.", 120, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1156 }, { PROC_LINKS(query_replace_identifier, 0), "query_replace_identifier", 24, "Queries the user for a string, and incrementally replace every occurence of the word or token found at the cursor with the specified string.", 140, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1178 }, { PROC_LINKS(query_replace_selection, 0), "query_replace_selection", 23, "Queries the user for a string, and incrementally replace every occurence of the string found in the selected range with the specified string.", 141, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1197 }, -{ PROC_LINKS(redo, 0), "redo", 4, "Advances forward through the undo history in the buffer containing the most recent regular edit.", 96, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1952 }, -{ PROC_LINKS(redo_this_buffer, 0), "redo_this_buffer", 16, "Advances forwards through the undo history of the current buffer.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1855 }, -{ PROC_LINKS(remap_interactive, 0), "remap_interactive", 17, "Switch to a named key binding map.", 34, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 386 }, +{ PROC_LINKS(redo, 0), "redo", 4, "Advances forwards through the undo history of the current buffer.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1853 }, +{ PROC_LINKS(redo_all_buffers, 0), "redo_all_buffers", 16, "Advances forward through the undo history in the buffer containing the most recent regular edit.", 96, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1950 }, +{ PROC_LINKS(remap_interactive, 0), "remap_interactive", 17, "Switch to a named key binding map.", 34, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 360 }, { PROC_LINKS(rename_file_query, 0), "rename_file_query", 17, "Queries the user for a new name and renames the file of the current buffer, altering the buffer's name too.", 107, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1345 }, { PROC_LINKS(rename_parameter, 0), "rename_parameter", 16, "If the cursor is found to be on the name of a function parameter in the signature of a function definition, all occurences within the scope of the function will be replaced with a new provided string.", 200, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 425 }, { PROC_LINKS(reopen, 0), "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1773 }, @@ -447,8 +447,8 @@ static Command_Metadata fcoder_metacmd_table[234] = { { PROC_LINKS(set_bindings_default, 0), "set_bindings_default", 20, "Remap keybindings using the 'default' mapping rule.", 51, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 61 }, { PROC_LINKS(set_bindings_mac_default, 0), "set_bindings_mac_default", 24, "Remap keybindings using the 'mac-default' mapping rule.", 55, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 75 }, { PROC_LINKS(set_mark, 0), "set_mark", 8, "Sets the mark to the current position of the cursor.", 52, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 133 }, -{ PROC_LINKS(set_mode_to_notepad_like, 0), "set_mode_to_notepad_like", 24, "Sets the edit mode to Notepad like.", 35, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 354 }, -{ PROC_LINKS(set_mode_to_original, 0), "set_mode_to_original", 20, "Sets the edit mode to 4coder original.", 38, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 348 }, +{ PROC_LINKS(set_mode_to_notepad_like, 0), "set_mode_to_notepad_like", 24, "Sets the edit mode to Notepad like.", 35, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 328 }, +{ PROC_LINKS(set_mode_to_original, 0), "set_mode_to_original", 20, "Sets the edit mode to 4coder original.", 38, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 322 }, { PROC_LINKS(setup_build_bat, 0), "setup_build_bat", 15, "Queries the user for several configuration options and initializes a new build batch script.", 92, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1500 }, { PROC_LINKS(setup_build_bat_and_sh, 0), "setup_build_bat_and_sh", 22, "Queries the user for several configuration options and initializes a new build batch script.", 92, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1512 }, { PROC_LINKS(setup_build_sh, 0), "setup_build_sh", 14, "Queries the user for several configuration options and initializes a new build shell script.", 92, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1506 }, @@ -458,27 +458,27 @@ static Command_Metadata fcoder_metacmd_table[234] = { { PROC_LINKS(snipe_token_or_word, 0), "snipe_token_or_word", 19, "Delete a single, whole token on or to the left of the cursor and post it to the clipboard.", 90, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1253 }, { PROC_LINKS(snipe_token_or_word_right, 0), "snipe_token_or_word_right", 25, "Delete a single, whole token on or to the right of the cursor and post it to the clipboard.", 91, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1259 }, { PROC_LINKS(snippet_lister, 0), "snippet_lister", 14, "Opens a snippet lister for inserting whole pre-written snippets of text.", 72, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 260 }, -{ PROC_LINKS(suppress_mouse, 0), "suppress_mouse", 14, "Hides the mouse and causes all mosue input (clicks, position, wheel) to be ignored.", 83, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 330 }, +{ PROC_LINKS(suppress_mouse, 0), "suppress_mouse", 14, "Hides the mouse and causes all mosue input (clicks, position, wheel) to be ignored.", 83, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 304 }, { PROC_LINKS(swap_buffers_between_panels, 0), "swap_buffers_between_panels", 27, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1704 }, { PROC_LINKS(to_lowercase, 0), "to_lowercase", 12, "Converts all ascii text in the range between the cursor and the mark to lowercase.", 82, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 483 }, { PROC_LINKS(to_uppercase, 0), "to_uppercase", 12, "Converts all ascii text in the range between the cursor and the mark to uppercase.", 82, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 463 }, { PROC_LINKS(toggle_filebar, 0), "toggle_filebar", 14, "Toggles the visibility status of the current view's filebar.", 60, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 624 }, { PROC_LINKS(toggle_fps_meter, 0), "toggle_fps_meter", 16, "Toggles the visibility of the FPS performance meter", 51, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 646 }, -{ PROC_LINKS(toggle_fullscreen, 0), "toggle_fullscreen", 17, "Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.", 89, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 378 }, -{ PROC_LINKS(toggle_highlight_enclosing_scopes, 0), "toggle_highlight_enclosing_scopes", 33, "In code files scopes surrounding the cursor are highlighted with distinguishing colors.", 87, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 366 }, -{ PROC_LINKS(toggle_highlight_line_at_cursor, 0), "toggle_highlight_line_at_cursor", 31, "Toggles the line highlight at the cursor.", 41, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 360 }, +{ PROC_LINKS(toggle_fullscreen, 0), "toggle_fullscreen", 17, "Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.", 89, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 352 }, +{ PROC_LINKS(toggle_highlight_enclosing_scopes, 0), "toggle_highlight_enclosing_scopes", 33, "In code files scopes surrounding the cursor are highlighted with distinguishing colors.", 87, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 340 }, +{ PROC_LINKS(toggle_highlight_line_at_cursor, 0), "toggle_highlight_line_at_cursor", 31, "Toggles the line highlight at the cursor.", 41, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 334 }, { PROC_LINKS(toggle_line_numbers, 0), "toggle_line_numbers", 19, "Toggles the left margin line numbers.", 37, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 743 }, { PROC_LINKS(toggle_line_wrap, 0), "toggle_line_wrap", 16, "Toggles the current buffer's line wrapping status.", 50, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 634 }, -{ PROC_LINKS(toggle_mouse, 0), "toggle_mouse", 12, "Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.", 71, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 342 }, -{ PROC_LINKS(toggle_paren_matching_helper, 0), "toggle_paren_matching_helper", 28, "In code files matching parentheses pairs are colored with distinguishing colors.", 80, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 372 }, +{ PROC_LINKS(toggle_mouse, 0), "toggle_mouse", 12, "Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.", 71, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 316 }, +{ PROC_LINKS(toggle_paren_matching_helper, 0), "toggle_paren_matching_helper", 28, "In code files matching parentheses pairs are colored with distinguishing colors.", 80, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 346 }, { PROC_LINKS(toggle_show_whitespace, 0), "toggle_show_whitespace", 22, "Toggles the current buffer's whitespace visibility status.", 58, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 733 }, { PROC_LINKS(toggle_virtual_whitespace, 0), "toggle_virtual_whitespace", 25, "Toggles the current buffer's virtual whitespace status.", 55, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 721 }, { PROC_LINKS(uncomment_line, 0), "uncomment_line", 14, "If present, delete '//' at the beginning of the line after leading whitespace.", 78, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 157 }, -{ PROC_LINKS(undo, 0), "undo", 4, "Advances backward through the undo history in the buffer containing the most recent regular edit.", 97, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1873 }, -{ PROC_LINKS(undo_this_buffer, 0), "undo_this_buffer", 16, "Advances backwards through the undo history of the current buffer.", 66, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1838 }, +{ PROC_LINKS(undo, 0), "undo", 4, "Advances backwards through the undo history of the current buffer.", 66, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1837 }, +{ PROC_LINKS(undo_all_buffers, 0), "undo_all_buffers", 16, "Advances backward through the undo history in the buffer containing the most recent regular edit.", 97, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1871 }, { PROC_LINKS(view_buffer_other_panel, 0), "view_buffer_other_panel", 23, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1689 }, { PROC_LINKS(view_jump_list_with_lister, 0), "view_jump_list_with_lister", 26, "When executed on a buffer with jumps, creates a persistent lister for all the jumps", 83, "w:\\4ed\\code\\4coder_jump_lister.cpp", 34, 104 }, -{ PROC_LINKS(word_complete, 0), "word_complete", 13, "Iteratively tries completing the word to the left of the cursor with other words in open buffers that have the same prefix string.", 130, "w:\\4ed\\code\\4coder_search.cpp", 29, 889 }, +{ PROC_LINKS(word_complete, 0), "word_complete", 13, "Iteratively tries completing the word to the left of the cursor with other words in open buffers that have the same prefix string.", 130, "w:\\4ed\\code\\4coder_search.cpp", 29, 883 }, { PROC_LINKS(write_and_auto_tab, 0), "write_and_auto_tab", 18, "Inserts a character and auto-indents the line on which the cursor sits.", 71, "w:\\4ed\\code\\4coder_auto_indent.cpp", 34, 649 }, { PROC_LINKS(write_block, 0), "write_block", 11, "At the cursor, insert a block comment.", 38, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 108 }, { PROC_LINKS(write_character, 0), "write_character", 15, "Inserts whatever character was used to trigger this command.", 60, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 71 }, @@ -641,7 +641,7 @@ static int32_t fcoder_metacmd_ID_query_replace = 147; static int32_t fcoder_metacmd_ID_query_replace_identifier = 148; static int32_t fcoder_metacmd_ID_query_replace_selection = 149; static int32_t fcoder_metacmd_ID_redo = 150; -static int32_t fcoder_metacmd_ID_redo_this_buffer = 151; +static int32_t fcoder_metacmd_ID_redo_all_buffers = 151; static int32_t fcoder_metacmd_ID_remap_interactive = 152; static int32_t fcoder_metacmd_ID_rename_file_query = 153; static int32_t fcoder_metacmd_ID_rename_parameter = 154; @@ -710,7 +710,7 @@ static int32_t fcoder_metacmd_ID_toggle_show_whitespace = 216; static int32_t fcoder_metacmd_ID_toggle_virtual_whitespace = 217; static int32_t fcoder_metacmd_ID_uncomment_line = 218; static int32_t fcoder_metacmd_ID_undo = 219; -static int32_t fcoder_metacmd_ID_undo_this_buffer = 220; +static int32_t fcoder_metacmd_ID_undo_all_buffers = 220; static int32_t fcoder_metacmd_ID_view_buffer_other_panel = 221; static int32_t fcoder_metacmd_ID_view_jump_list_with_lister = 222; static int32_t fcoder_metacmd_ID_word_complete = 223; diff --git a/4coder_helper.cpp b/4coder_helper.cpp index 0a4ad0d1..33f13a30 100644 --- a/4coder_helper.cpp +++ b/4coder_helper.cpp @@ -607,12 +607,6 @@ view_open_file(Application_Links *app, View_ID view, char *filename, i32 filenam //////////////////////////////// -// TODO(allen): replace this with get_view_prev(app, 0, access, view_id_out); -static b32 -get_view_last(Application_Links *app, Access_Flag access, View_ID *view_id_out){ - return(get_view_prev(app, 0, access, view_id_out)); -} - static View_ID get_next_view_looped_all_panels(Application_Links *app, View_ID view_id, Access_Flag access){ if (!get_view_next(app, view_id, access, &view_id)){ @@ -633,37 +627,6 @@ get_prev_view_looped_all_panels(Application_Links *app, View_ID view_id, Access_ return(view_id); } -//// - -static void -get_view_prev(Application_Links *app, View_Summary *view, Access_Flag access){ - View_ID new_id = 0; - get_view_prev(app, view->view_id, access, &new_id); - get_view_summary(app, new_id, access, view); -} - -static View_Summary -get_view_last(Application_Links *app, Access_Flag access){ - View_Summary view = {}; - View_ID new_id = 0; - if (get_view_last(app, access, &new_id)){ - get_view_summary(app, new_id, access, &view); - } - return(view); -} - -static void -get_next_view_looped_all_panels(Application_Links *app, View_Summary *view, Access_Flag access){ - View_ID new_id = get_next_view_looped_all_panels(app, view->view_id, access); - get_view_summary(app, new_id, access, view); -} - -static void -get_prev_view_looped_all_panels(Application_Links *app, View_Summary *view, u32 access){ - View_ID new_id = get_prev_view_looped_all_panels(app, view->view_id, access); - get_view_summary(app, new_id, access, view); -} - //////////////////////////////// static Buffer_Kill_Result @@ -676,11 +639,6 @@ kill_buffer(Application_Links *app, Buffer_Identifier identifier, View_ID gui_vi return(result); } -static void -refresh_view(Application_Links *app, View_Summary *view){ - *view = get_view(app, view->view_id, AccessAll); -} - static i32 character_pos_to_pos(Application_Links *app, View_ID view, i32 character_pos){ i32 result = 0; @@ -1233,12 +1191,12 @@ get_query_string(Application_Links *app, char *query_str, char *string_space, i3 } static String -get_string_in_view_range(Application_Links *app, Partition *arena, View_Summary *view){ +get_string_in_view_range(Application_Links *app, Partition *arena, View_ID view){ String str = {}; Buffer_ID buffer = 0; - view_get_buffer(app, view->view_id, AccessProtected, &buffer); + view_get_buffer(app, view, AccessProtected, &buffer); if (buffer_exists(app, buffer)){ - Range range = get_view_range(app, view->view_id); + Range range = get_view_range(app, view); i32 query_length = range.max - range.min; if (query_length != 0){ char *query_space = push_array(arena, char, query_length); @@ -1521,21 +1479,24 @@ no_mark_snap_to_cursor_if_shift(Application_Links *app, View_ID view_id){ static b32 view_has_highlighted_range(Application_Links *app, View_ID view_id){ + b32 result = false; if (fcoder_mode == FCoderMode_NotepadLike){ - View_Summary view = get_view(app, view_id, AccessAll); - return(view.cursor.pos != view.mark.pos); + i32 pos = 0; + i32 mark = 0; + view_get_cursor_pos(app, view_id, &pos); + view_get_mark_pos(app, view_id, &mark); + result = (pos != mark); } - return(false); + return(result); } static b32 if_view_has_highlighted_range_delete_range(Application_Links *app, View_ID view_id){ b32 result = false; if (view_has_highlighted_range(app, view_id)){ - View_Summary view = get_view(app, view_id, AccessAll); Range range = get_view_range(app, view_id); Buffer_ID buffer = 0; - view_get_buffer(app, view.view_id, AccessOpen, &buffer); + view_get_buffer(app, view_id, AccessOpen, &buffer); buffer_replace_range(app, buffer, range, make_lit_string("")); result = true; } @@ -1545,22 +1506,47 @@ if_view_has_highlighted_range_delete_range(Application_Links *app, View_ID view_ static void begin_notepad_mode(Application_Links *app){ fcoder_mode = FCoderMode_NotepadLike; - for (View_Summary view = get_view_first(app, AccessAll); - view.exists; - get_view_next(app, &view, AccessAll)){ - view_set_mark(app, &view, seek_pos(view.cursor.pos)); + View_ID view = 0; + for (get_view_next(app, 0, AccessAll, &view); + view != 0; + get_view_next(app, view, AccessAll, &view)){ + i32 pos = 0; + view_get_cursor_pos(app, view, &pos); + view_set_mark(app, view, seek_pos(pos)); } } //////////////////////////////// static b32 -view_set_split_proportion(Application_Links *app, View_Summary *view, f32 t){ +view_set_split(Application_Links *app, View_ID view, View_Split_Kind kind, f32 t){ + b32 result = false; + if (view != 0){ + Panel_ID panel_id = 0; + if (view_get_panel(app, view, &panel_id)){ + Panel_ID parent_panel_id = 0; + if (panel_get_parent(app, panel_id, &parent_panel_id)){ + Panel_ID min_child_id = 0; + if (panel_get_child(app, parent_panel_id, PanelChild_Min, &min_child_id)){ + b32 panel_is_min = (min_child_id == panel_id); + Panel_Split_Kind panel_kind = ((kind == ViewSplitKind_Ratio)? + (panel_is_min?PanelSplitKind_Ratio_Min:PanelSplitKind_Ratio_Max): + (panel_is_min?PanelSplitKind_FixedPixels_Min:PanelSplitKind_FixedPixels_Max)); + result = panel_set_split(app, parent_panel_id, panel_kind, t); + } + } + } + } + return(result); +} + +static b32 +view_set_split_proportion(Application_Links *app, View_ID view, f32 t){ return(view_set_split(app, view, ViewSplitKind_Ratio, t)); } static b32 -view_set_split_pixel_size(Application_Links *app, View_Summary *view, i32 t){ +view_set_split_pixel_size(Application_Links *app, View_ID view, i32 t){ return(view_set_split(app, view, ViewSplitKind_FixedPixels, (f32)t)); } diff --git a/4coder_jump_direct.cpp b/4coder_jump_direct.cpp index c4463607..08607b5c 100644 --- a/4coder_jump_direct.cpp +++ b/4coder_jump_direct.cpp @@ -9,9 +9,16 @@ CUSTOM_COMMAND_SIG(goto_jump_at_cursor_direct) CUSTOM_DOC("If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in another view and changes the active panel to the view containing the jump.") { Temp_Memory temp = begin_temp_memory(&global_part); - View_Summary view = get_active_view(app, AccessProtected); + View_ID view = 0; + get_active_view(app, AccessProtected, &view); + Buffer_ID buffer = 0; + view_get_buffer(app, view, AccessProtected, &buffer); + i32 pos = 0; + view_get_cursor_pos(app, view, &pos); + Full_Cursor cursor = {}; + view_compute_cursor(app, view, seek_pos(pos), &cursor); - Parsed_Jump jump = parse_jump_from_buffer_line(app, &global_part, view.buffer_id, view.cursor.line, false); + Parsed_Jump jump = parse_jump_from_buffer_line(app, &global_part, buffer, cursor.line, false); if (jump.success){ change_active_panel(app); View_ID target_view = 0; @@ -30,14 +37,21 @@ CUSTOM_COMMAND_SIG(goto_jump_at_cursor_same_panel_direct) CUSTOM_DOC("If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list..") { Temp_Memory temp = begin_temp_memory(&global_part); - View_Summary view = get_active_view(app, AccessProtected); + View_ID view = 0; + get_active_view(app, AccessProtected, &view); + Buffer_ID buffer = 0; + view_get_buffer(app, view, AccessProtected, &buffer); + i32 pos = 0; + view_get_cursor_pos(app, view, &pos); + Full_Cursor cursor = {}; + view_compute_cursor(app, view, seek_pos(pos), &cursor); - Parsed_Jump jump = parse_jump_from_buffer_line(app, &global_part, view.buffer_id, view.cursor.line, false); + Parsed_Jump jump = parse_jump_from_buffer_line(app, &global_part, buffer, cursor.line, false); if (jump.success){ - View_Summary target_view = view; + View_ID target_view = view; Buffer_ID buffer = {}; if (get_jump_buffer(app, &buffer, &jump.location)){ - jump_to_location(app, target_view.view_id, buffer, jump.location); + jump_to_location(app, target_view, buffer, jump.location); } } @@ -100,12 +114,13 @@ CUSTOM_DOC("If a buffer containing jump locations has been locked in, goes to th CUSTOM_COMMAND_SIG(newline_or_goto_position_direct) CUSTOM_DOC("If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.") { - View_Summary view = get_active_view(app, AccessProtected); + View_ID view = 0; + get_active_view(app, AccessProtected, &view); Buffer_ID buffer = 0; - if (view_get_buffer(app, view.view_id, AccessOpen, &buffer)){ + if (view_get_buffer(app, view, AccessOpen, &buffer)){ write_character(app); } - else if (view_get_buffer(app, view.view_id, AccessProtected, &buffer)){ + else if (view_get_buffer(app, view, AccessProtected, &buffer)){ goto_jump_at_cursor_direct(app); lock_jump_buffer(app, buffer); } @@ -114,12 +129,13 @@ CUSTOM_DOC("If the buffer in the active view is writable, inserts a character, o CUSTOM_COMMAND_SIG(newline_or_goto_position_same_panel_direct) CUSTOM_DOC("If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.") { - View_Summary view = get_active_view(app, AccessProtected); + View_ID view = 0; + get_active_view(app, AccessProtected, &view); Buffer_ID buffer = 0; - if (view_get_buffer(app, view.view_id, AccessOpen, &buffer)){ + if (view_get_buffer(app, view, AccessOpen, &buffer)){ write_character(app); } - else if (view_get_buffer(app, view.view_id, AccessProtected, &buffer)){ + else if (view_get_buffer(app, view, AccessProtected, &buffer)){ goto_jump_at_cursor_same_panel_direct(app); lock_jump_buffer(app, buffer); } diff --git a/4coder_jump_sticky.cpp b/4coder_jump_sticky.cpp index 1c965005..40e933e6 100644 --- a/4coder_jump_sticky.cpp +++ b/4coder_jump_sticky.cpp @@ -350,10 +350,18 @@ CUSTOM_DOC("If the cursor is found to be on a jump location, parses the jump loc Partition *part = &global_part; Temp_Memory temp = begin_temp_memory(part); - View_Summary view = get_active_view(app, AccessProtected); - Marker_List *list = get_or_make_list_for_buffer(app, part, heap, view.buffer_id); + View_ID view = 0; + get_active_view(app, AccessProtected, &view); + Buffer_ID buffer = 0; + view_get_buffer(app, view, AccessProtected, &buffer); + Marker_List *list = get_or_make_list_for_buffer(app, part, heap, buffer); - i32 list_index = get_index_exact_from_list(app, part, list, view.cursor.line); + i32 pos = 0; + view_get_cursor_pos(app, view, &pos); + Full_Cursor cursor = {}; + view_compute_cursor(app, view, seek_pos(pos), &cursor); + + i32 list_index = get_index_exact_from_list(app, part, list, cursor.line); if (list_index >= 0){ ID_Pos_Jump_Location location = {}; @@ -361,9 +369,10 @@ CUSTOM_DOC("If the cursor is found to be on a jump location, parses the jump loc Buffer_ID buffer = {}; if (get_jump_buffer(app, &buffer, &location)){ change_active_panel(app); - View_Summary target_view = get_active_view(app, AccessAll); - switch_to_existing_view(app, target_view.view_id, buffer); - jump_to_location(app, target_view.view_id, buffer, location); + View_ID target_view = 0; + get_active_view(app, AccessAll, &target_view); + switch_to_existing_view(app, target_view, buffer); + jump_to_location(app, target_view, buffer, location); } } } @@ -378,16 +387,26 @@ CUSTOM_DOC("If the cursor is found to be on a jump location, parses the jump loc Partition *part = &global_part; Temp_Memory temp = begin_temp_memory(part); - View_Summary view = get_active_view(app, AccessProtected); - Marker_List *list = get_or_make_list_for_buffer(app, part, heap, view.buffer_id); - i32 list_index = get_index_exact_from_list(app, part, list, view.cursor.line); + View_ID view = 0; + get_active_view(app, AccessProtected, &view); + Buffer_ID buffer = 0; + view_get_buffer(app, view, AccessProtected, &buffer); + + Marker_List *list = get_or_make_list_for_buffer(app, part, heap, buffer); + + i32 pos = 0; + view_get_cursor_pos(app, view, &pos); + Full_Cursor cursor = {}; + view_compute_cursor(app, view, seek_pos(pos), &cursor); + + i32 list_index = get_index_exact_from_list(app, part, list, cursor.line); if (list_index >= 0){ ID_Pos_Jump_Location location = {}; if (get_jump_from_list(app, list, list_index, &location)){ Buffer_ID buffer = {}; if (get_jump_buffer(app, &buffer, &location)){ - jump_to_location(app, view.view_id, buffer, location); + jump_to_location(app, view, buffer, location); } } } @@ -399,13 +418,14 @@ static void goto_jump_in_order(Application_Links *app, Marker_List *list, View_ID jump_view, ID_Pos_Jump_Location location){ Buffer_ID buffer = {}; if (get_jump_buffer(app, &buffer, &location)){ - View_Summary target_view = get_active_view(app, AccessAll); - if (target_view.view_id == jump_view){ + View_ID target_view = 0; + get_active_view(app, AccessAll, &target_view); + if (target_view == jump_view){ change_active_panel(app); - target_view = get_active_view(app, AccessAll); + get_active_view(app, AccessAll, &target_view); } - switch_to_existing_view(app, target_view.view_id, buffer); - jump_to_location(app, target_view.view_id, buffer, location); + switch_to_existing_view(app, target_view, buffer); + jump_to_location(app, target_view, buffer, location); prev_location.buffer_id = location.buffer_id; prev_location.line = location.pos; prev_location.column = 0; @@ -585,12 +605,13 @@ CUSTOM_DOC("If a buffer containing jump locations has been locked in, goes to th CUSTOM_COMMAND_SIG(newline_or_goto_position_sticky) CUSTOM_DOC("If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.") { - View_Summary view = get_active_view(app, AccessProtected); + View_ID view = 0; + get_active_view(app, AccessProtected, &view); Buffer_ID buffer = 0; - if (view_get_buffer(app, view.view_id, AccessOpen, &buffer)){ + if (view_get_buffer(app, view, AccessOpen, &buffer)){ write_character(app); } - else if (view_get_buffer(app, view.view_id, AccessProtected, &buffer)){ + else if (view_get_buffer(app, view, AccessProtected, &buffer)){ goto_jump_at_cursor_sticky(app); lock_jump_buffer(app, buffer); } @@ -599,12 +620,13 @@ CUSTOM_DOC("If the buffer in the active view is writable, inserts a character, o CUSTOM_COMMAND_SIG(newline_or_goto_position_same_panel_sticky) CUSTOM_DOC("If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.") { - View_Summary view = get_active_view(app, AccessProtected); + View_ID view = 0; + get_active_view(app, AccessProtected, &view); Buffer_ID buffer = 0; - if (view_get_buffer(app, view.view_id, AccessOpen, &buffer)){ + if (view_get_buffer(app, view, AccessOpen, &buffer)){ write_character(app); } - else if (view_get_buffer(app, view.view_id, AccessProtected, &buffer)){ + else if (view_get_buffer(app, view, AccessProtected, &buffer)){ goto_jump_at_cursor_same_panel_sticky(app); lock_jump_buffer(app, buffer); } diff --git a/4coder_miblo_numbers.cpp b/4coder_miblo_numbers.cpp index 8f464fe3..93fe3d45 100644 --- a/4coder_miblo_numbers.cpp +++ b/4coder_miblo_numbers.cpp @@ -97,32 +97,38 @@ get_numeric_at_cursor(Application_Links *app, Buffer_ID buffer, i32 pos, Miblo_N CUSTOM_COMMAND_SIG(miblo_increment_basic) CUSTOM_DOC("Increment an integer under the cursor by one.") { - View_Summary view = get_active_view(app, AccessOpen); + View_ID view = 0; + get_active_view(app, AccessOpen, &view); Buffer_ID buffer = 0; - view_get_buffer(app, view.view_id, AccessOpen, &buffer); + view_get_buffer(app, view, AccessOpen, &buffer); + i32 pos = 0; + view_get_cursor_pos(app, view, &pos); Miblo_Number_Info number = {}; - if (get_numeric_at_cursor(app, buffer, view.cursor.pos, &number)){ + if (get_numeric_at_cursor(app, buffer, pos, &number)){ char str_space[1024]; String str = make_fixed_width_string(str_space); int_to_str(&str, number.x + 1); buffer_replace_range(app, buffer, number.range, str); - view_set_cursor(app, &view, seek_pos(number.start + str.size - 1), 1); + view_set_cursor(app, view, seek_pos(number.start + str.size - 1), true); } } CUSTOM_COMMAND_SIG(miblo_decrement_basic) CUSTOM_DOC("Decrement an integer under the cursor by one.") { - View_Summary view = get_active_view(app, AccessOpen); + View_ID view = 0; + get_active_view(app, AccessOpen, &view); Buffer_ID buffer = 0; - view_get_buffer(app, view.view_id, AccessOpen, &buffer); + view_get_buffer(app, view, AccessOpen, &buffer); + i32 pos = 0; + view_get_cursor_pos(app, view, &pos); Miblo_Number_Info number = {}; - if (get_numeric_at_cursor(app, buffer, view.cursor.pos, &number)){ + if (get_numeric_at_cursor(app, buffer, pos, &number)){ char str_space[1024]; String str = make_fixed_width_string(str_space); int_to_str(&str, number.x - 1); buffer_replace_range(app, buffer, number.range, str); - view_set_cursor(app, &view, seek_pos(number.start + str.size - 1), 1); + view_set_cursor(app, view, seek_pos(number.start + str.size - 1), true); } } @@ -366,19 +372,22 @@ get_timestamp_at_cursor(Application_Links *app, Buffer_ID buffer, i32 pos, Miblo static void miblo_time_stamp_alter(Application_Links *app, i32 unit_type, i32 amt){ - View_Summary view = get_active_view(app, AccessOpen); + View_ID view = 0; + get_active_view(app, AccessOpen, &view); Buffer_ID buffer = 0; - view_get_buffer(app, view.view_id, AccessOpen, &buffer); + view_get_buffer(app, view, AccessOpen, &buffer); + i32 pos = 0; + view_get_cursor_pos(app, view, &pos); Miblo_Timestamp_Info timestamp = {}; - if (get_timestamp_at_cursor(app, buffer, view.cursor.pos, ×tamp)){ + if (get_timestamp_at_cursor(app, buffer, pos, ×tamp)){ char str_space[1024]; String str = make_fixed_width_string(str_space); Miblo_Timestamp inc_timestamp = increment_timestamp(timestamp.time, unit_type, amt); timestamp_to_str(&str, inc_timestamp); buffer_replace_range(app, buffer, timestamp.range, str); - view_set_cursor(app, &view, seek_pos(timestamp.start + str.size - 1), 1); + view_set_cursor(app, view, seek_pos(timestamp.start + str.size - 1), true); } } diff --git a/4coder_search.cpp b/4coder_search.cpp index 71970260..0fe2ec3a 100644 --- a/4coder_search.cpp +++ b/4coder_search.cpp @@ -707,17 +707,14 @@ list__parameters_buffer(Application_Links *app, Heap *heap, Partition *scratch, } static void -list__parameters(Application_Links *app, Heap *heap, Partition *scratch, String *strings, i32 count, - Search_Range_Flag match_flags, View_Summary default_target_view){ +list__parameters(Application_Links *app, Heap *heap, Partition *scratch, String *strings, i32 count, Search_Range_Flag match_flags, View_ID default_target_view){ // Open the search buffer - Buffer_ID search_buffer_id = create_or_switch_to_buffer_by_name(app, search_name.str, search_name.size, default_target_view); + Buffer_ID search_buffer_id = create_or_switch_to_buffer_by_name(app, search_name, default_target_view); list__parameters_buffer(app, heap, scratch, strings, count, match_flags, search_buffer_id); } static void -list_single__parameters(Application_Links *app, Heap *heap, Partition *scratch, - String str, b32 substrings, b32 case_insensitive, - View_Summary default_target_view){ +list_single__parameters(Application_Links *app, Heap *heap, Partition *scratch, String str, b32 substrings, b32 case_insensitive, View_ID default_target_view){ Search_Range_Flag flags = 0; if (substrings){ flags |= SearchFlag_MatchSubstring; @@ -732,9 +729,7 @@ list_single__parameters(Application_Links *app, Heap *heap, Partition *scratch, } static void -list_query__parameters(Application_Links *app, Heap *heap, Partition *scratch, - b32 substrings, b32 case_insensitive, - View_Summary default_target_view){ +list_query__parameters(Application_Links *app, Heap *heap, Partition *scratch, b32 substrings, b32 case_insensitive, View_ID default_target_view){ char space[1024]; String str = get_query_string(app, "List Locations For: ", space, sizeof(space)); if (str.size > 0){ @@ -743,15 +738,16 @@ list_query__parameters(Application_Links *app, Heap *heap, Partition *scratch, } static void -list_identifier__parameters(Application_Links *app, Heap *heap, Partition *scratch, - b32 substrings, b32 case_insensitive, - View_Summary default_target_view){ - View_Summary view = get_active_view(app, AccessProtected); +list_identifier__parameters(Application_Links *app, Heap *heap, Partition *scratch, b32 substrings, b32 case_insensitive, View_ID default_target_view){ + View_ID view = 0; + get_active_view(app, AccessProtected, &view); Buffer_ID buffer = 0; - view_get_buffer(app, view.view_id, AccessProtected, &buffer); - if (buffer_exists(app, buffer)){ + view_get_buffer(app, view, AccessProtected, &buffer); + if (buffer != 0){ + i32 pos = 0; + view_get_cursor_pos(app, view, &pos); char space[512]; - String str = get_token_or_word_under_pos(app, buffer, view.cursor.pos, space, sizeof(space)); + String str = get_token_or_word_under_pos(app, buffer, pos, space, sizeof(space)); if (str.size > 0){ list_single__parameters(app, heap, scratch, str, substrings, case_insensitive, default_target_view); } @@ -759,12 +755,11 @@ list_identifier__parameters(Application_Links *app, Heap *heap, Partition *scrat } static void -list_selected_range__parameters(Application_Links *app, Heap *heap, Partition *scratch, - b32 substrings, b32 case_insensitive, - View_Summary default_target_view){ - View_Summary view = get_active_view(app, AccessProtected); +list_selected_range__parameters(Application_Links *app, Heap *heap, Partition *scratch, b32 substrings, b32 case_insensitive, View_ID default_target_view){ + View_ID view = 0; + get_active_view(app, AccessProtected, &view); Temp_Memory temp = begin_temp_memory(scratch); - String str = get_string_in_view_range(app, scratch, &view); + String str = get_string_in_view_range(app, scratch, view); if (str.size > 0){ list_single__parameters(app, heap, scratch, str, substrings, case_insensitive, default_target_view); } @@ -772,9 +767,7 @@ list_selected_range__parameters(Application_Links *app, Heap *heap, Partition *s } static void -list_type_definition__parameters(Application_Links *app, Heap *heap, Partition *scratch, - String str, - View_Summary default_target_view){ +list_type_definition__parameters(Application_Links *app, Heap *heap, Partition *scratch, String str, View_ID default_target_view){ Temp_Memory temp = begin_temp_memory(scratch); String match_strings[9]; @@ -789,9 +782,7 @@ list_type_definition__parameters(Application_Links *app, Heap *heap, Partition * match_strings[i++] = string_push_f(scratch, "enum %.*s\n{" , str.size, str.str); match_strings[i++] = string_push_f(scratch, "enum %.*s {" , str.size, str.str); - list__parameters(app, heap, scratch, - match_strings, ArrayCount(match_strings), 0, - default_target_view); + list__parameters(app, heap, scratch, match_strings, ArrayCount(match_strings), 0, default_target_view); end_temp_memory(temp); } @@ -801,56 +792,56 @@ list_type_definition__parameters(Application_Links *app, Heap *heap, Partition * CUSTOM_COMMAND_SIG(list_all_locations) CUSTOM_DOC("Queries the user for a string and lists all exact case-sensitive matches found in all open buffers.") { - View_Summary target_view = get_next_view_after_active(app, AccessAll); + View_ID target_view = get_next_view_after_active(app, AccessAll); list_query__parameters(app, &global_heap, &global_part, false, false, target_view); } CUSTOM_COMMAND_SIG(list_all_substring_locations) CUSTOM_DOC("Queries the user for a string and lists all case-sensitive substring matches found in all open buffers.") { - View_Summary target_view = get_next_view_after_active(app, AccessAll); + View_ID target_view = get_next_view_after_active(app, AccessAll); list_query__parameters(app, &global_heap, &global_part, true, false, target_view); } CUSTOM_COMMAND_SIG(list_all_locations_case_insensitive) CUSTOM_DOC("Queries the user for a string and lists all exact case-insensitive matches found in all open buffers.") { - View_Summary target_view = get_next_view_after_active(app, AccessAll); + View_ID target_view = get_next_view_after_active(app, AccessAll); list_query__parameters(app, &global_heap, &global_part, false, true, target_view); } CUSTOM_COMMAND_SIG(list_all_substring_locations_case_insensitive) CUSTOM_DOC("Queries the user for a string and lists all case-insensitive substring matches found in all open buffers.") { - View_Summary target_view = get_next_view_after_active(app, AccessAll); + View_ID target_view = get_next_view_after_active(app, AccessAll); list_query__parameters(app, &global_heap, &global_part, true, true, target_view); } CUSTOM_COMMAND_SIG(list_all_locations_of_identifier) CUSTOM_DOC("Reads a token or word under the cursor and lists all exact case-sensitive mathces in all open buffers.") { - View_Summary target_view = get_next_view_after_active(app, AccessAll); + View_ID target_view = get_next_view_after_active(app, AccessAll); list_identifier__parameters(app, &global_heap, &global_part, false, false, target_view); } CUSTOM_COMMAND_SIG(list_all_locations_of_identifier_case_insensitive) CUSTOM_DOC("Reads a token or word under the cursor and lists all exact case-insensitive mathces in all open buffers.") { - View_Summary target_view = get_next_view_after_active(app, AccessAll); + View_ID target_view = get_next_view_after_active(app, AccessAll); list_identifier__parameters(app, &global_heap, &global_part, false, true, target_view); } CUSTOM_COMMAND_SIG(list_all_locations_of_selection) CUSTOM_DOC("Reads the string in the selected range and lists all exact case-sensitive mathces in all open buffers.") { - View_Summary target_view = get_next_view_after_active(app, AccessAll); + View_ID target_view = get_next_view_after_active(app, AccessAll); list_selected_range__parameters(app, &global_heap, &global_part, false, false, target_view); } CUSTOM_COMMAND_SIG(list_all_locations_of_selection_case_insensitive) CUSTOM_DOC("Reads the string in the selected range and lists all exact case-insensitive mathces in all open buffers.") { - View_Summary target_view = get_next_view_after_active(app, AccessAll); + View_ID target_view = get_next_view_after_active(app, AccessAll); list_selected_range__parameters(app, &global_heap, &global_part, false, true, target_view); } @@ -860,7 +851,7 @@ CUSTOM_DOC("Queries user for string, lists all locations of strings that appear char space[1024]; String str = get_query_string(app, "List Definitions For: ", space, sizeof(space)); if (str.size > 0){ - View_Summary target_view = get_next_view_after_active(app, AccessAll); + View_ID target_view = get_next_view_after_active(app, AccessAll); list_type_definition__parameters(app, &global_heap, &global_part, str, target_view); } } @@ -868,13 +859,16 @@ CUSTOM_DOC("Queries user for string, lists all locations of strings that appear CUSTOM_COMMAND_SIG(list_all_locations_of_type_definition_of_identifier) CUSTOM_DOC("Reads a token or word under the cursor and lists all locations of strings that appear to define a type whose name matches it.") { - View_Summary view = get_active_view(app, AccessProtected); + View_ID target_view = 0; + get_active_view(app, AccessProtected, &target_view); Buffer_ID buffer = 0; - view_get_buffer(app, view.view_id, AccessProtected, &buffer); + view_get_buffer(app, target_view, AccessProtected, &buffer); + i32 pos = 0; + view_get_cursor_pos(app, target_view, &pos); char space[512]; - String str = get_token_or_word_under_pos(app, buffer, view.cursor.pos, space, sizeof(space) - 1); + String str = get_token_or_word_under_pos(app, buffer, pos, space, sizeof(space) - 1); if (str.size > 0){ - View_Summary target_view = get_next_view_after_active(app, AccessAll); + target_view = get_next_view_after_active(app, AccessAll); list_type_definition__parameters(app, &global_heap, &global_part, str, target_view); } } @@ -889,12 +883,13 @@ static Word_Complete_State complete_state = {}; CUSTOM_COMMAND_SIG(word_complete) CUSTOM_DOC("Iteratively tries completing the word to the left of the cursor with other words in open buffers that have the same prefix string.") { - View_Summary view = get_active_view(app, AccessOpen); + View_ID view = 0; + get_active_view(app, AccessOpen, &view); Buffer_ID buffer = 0; - if (view_get_buffer(app, view.view_id, AccessOpen, &buffer)){ + if (view_get_buffer(app, view, AccessOpen, &buffer)){ i32 do_init = false; - Managed_Scope scope = view_get_managed_scope(app, view.view_id); + Managed_Scope scope = view_get_managed_scope(app, view); u64 rewrite = 0; managed_variable_get(app, scope, view_rewrite_loc, &rewrite); @@ -914,7 +909,8 @@ CUSTOM_DOC("Iteratively tries completing the word to the left of the cursor with if (do_init){ // NOTE(allen): Get the range where the // partial word is written. - word_end = view.cursor.pos; + word_end = 0; + view_get_cursor_pos(app, view, &word_end); word_start = word_end; cursor_pos = word_end - 1; @@ -1012,7 +1008,7 @@ CUSTOM_DOC("Iteratively tries completing the word to the left of the cursor with if (search_hit_add(&global_heap, &complete_state.hits, &complete_state.str, spare, match_size)){ buffer_replace_range(app, buffer, make_range(word_start, word_end), make_string(spare, match_size)); - view_set_cursor(app, &view, seek_pos(word_start + match_size), true); + view_set_cursor(app, view, seek_pos(word_start + match_size), true); complete_state.word_end = word_start + match_size; complete_state.set.ranges[0].mid_size = match_size; @@ -1032,7 +1028,7 @@ CUSTOM_DOC("Iteratively tries completing the word to the left of the cursor with match_size = word.size; char *str = word.str; buffer_replace_range(app, buffer, make_range(word_start, word_end), make_string(str, match_size)); - view_set_cursor(app, &view, seek_pos(word_start + match_size), true); + view_set_cursor(app, view, seek_pos(word_start + match_size), true); complete_state.word_end = word_start + match_size; complete_state.set.ranges[0].mid_size = match_size; diff --git a/4coder_system_command.cpp b/4coder_system_command.cpp index 77cb788c..50ad9ba2 100644 --- a/4coder_system_command.cpp +++ b/4coder_system_command.cpp @@ -12,11 +12,10 @@ CUSTOM_DOC("If the command execute_any_cli has already been used, this will exec String hot_directory = make_string_slowly(hot_directory_space); if (out_buffer.size > 0 && cmd.size > 0 && hot_directory.size > 0){ - u32 access = AccessAll; - View_Summary view = get_active_view(app, access); - - exec_system_command(app, &view, buffer_identifier(out_buffer.str, out_buffer.size), hot_directory.str, hot_directory.size, cmd.str, cmd.size, CLI_OverlapWithConflict|CLI_CursorAtEnd|CLI_SendEndSignal); - lock_jump_buffer(out_buffer.str, out_buffer.size); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + exec_system_command(app, view, buffer_identifier(out_buffer.str, out_buffer.size), hot_directory.str, hot_directory.size, cmd.str, cmd.size, CLI_OverlapWithConflict|CLI_CursorAtEnd|CLI_SendEndSignal); + lock_jump_buffer(out_buffer); } } diff --git a/4coder_ui_helper.cpp b/4coder_ui_helper.cpp index 3670d179..ed78529f 100644 --- a/4coder_ui_helper.cpp +++ b/4coder_ui_helper.cpp @@ -314,13 +314,13 @@ lister_get_clicked_item(Application_Links *app, View_ID view_id, Partition *scra UI_Data *ui_data = 0; Arena *ui_arena = 0; if (view_get_ui_data(app, view_id, ViewGetUIFlag_KeepDataAsIs, &ui_data, &ui_arena)){ - View_Summary view = {}; - get_view_summary(app, view_id, AccessAll, &view); + GUI_Scroll_Vars scroll_vars = {}; + view_get_scroll_vars(app, view_id, &scroll_vars); Mouse_State mouse = get_mouse_state(app); Rect_i32 buffer_region = {}; view_get_buffer_region(app, view_id, &buffer_region); Vec2_i32 region_p0 = buffer_region.p0; - Vec2_i32 m_view_space = get_mouse_position_in_view_space(mouse, region_p0, V2i32(view.scroll_vars.scroll_p)); + Vec2_i32 m_view_space = get_mouse_position_in_view_space(mouse, region_p0, V2i32(scroll_vars.scroll_p)); Vec2_i32 m_panel_space = get_mouse_position_in_panel_space(mouse, region_p0); UI_Item *clicked = ui_control_get_mouse_hit(ui_data, m_view_space, m_panel_space); if (clicked != 0){