Buffer Markers as Managed Objects

master
Allen Webster 2018-09-03 17:37:54 -07:00
parent 7ba053b2cc
commit 617804e54d
12 changed files with 351 additions and 443 deletions

View File

@ -18,13 +18,19 @@ write_character_parameter(Application_Links *app, uint8_t *character, uint32_t l
next_cursor_marker.pos = character_pos_to_pos(app, &view, &buffer, view.cursor.character_pos);
next_cursor_marker.lean_right = true;
Managed_Object handle = buffer_add_markers(app, buffer.buffer_id, 1, 0);
buffer_set_markers(app, handle, 0, 1, &next_cursor_marker);
//Managed_Object handle = buffer_add_markers(app, buffer.buffer_id, 1, 0);
//buffer_set_markers(app, handle, 0, 1, &next_cursor_marker);
Managed_Object handle = buffer_markers_alloc(app, buffer.buffer_id, 1, 0);
managed_object_write(app, handle, 0, sizeof(Marker), &next_cursor_marker);
buffer_replace_range(app, &buffer, pos, pos, (char*)character, length);
buffer_get_markers(app, handle, 0, 1, &next_cursor_marker);
buffer_remove_markers(app, handle);
//buffer_get_markers(app, handle, 0, 1, &next_cursor_marker);
//buffer_remove_markers(app, handle);
managed_object_read(app, handle, 0, sizeof(Marker), &next_cursor_marker);
managed_object_free(app, handle);
view_set_cursor(app, &view, seek_pos(next_cursor_marker.pos), true);
}

View File

@ -17,11 +17,6 @@ struct Application_Links;
#define BUFFER_REPLACE_RANGE_SIG(n) bool32 n(Application_Links *app, Buffer_Summary *buffer, int32_t start, int32_t end, char *str, int32_t len)
#define BUFFER_COMPUTE_CURSOR_SIG(n) bool32 n(Application_Links *app, Buffer_Summary *buffer, Buffer_Seek seek, Partial_Cursor *cursor_out)
#define BUFFER_BATCH_EDIT_SIG(n) bool32 n(Application_Links *app, Buffer_Summary *buffer, char *str, int32_t str_len, Buffer_Edit *edits, int32_t edit_count, Buffer_Batch_Edit_Type type)
#define BUFFER_ADD_MARKERS_SIG(n) Managed_Object n(Application_Links *app, Buffer_ID buffer_id, uint32_t marker_count, Managed_Scope *scope)
#define GET_BUFFER_BY_MARKER_HANDLE_SIG(n) Buffer_Summary n(Application_Links *app, Managed_Object marker_object, Access_Flag access)
#define BUFFER_SET_MARKERS_SIG(n) bool32 n(Application_Links *app, Managed_Object marker_object, uint32_t first_marker_index, uint32_t marker_count, Marker *source_markers)
#define BUFFER_GET_MARKERS_SIG(n) bool32 n(Application_Links *app, Managed_Object marker_object, uint32_t first_marker_index, uint32_t marker_count, Marker *markers_out)
#define BUFFER_REMOVE_MARKERS_SIG(n) bool32 n(Application_Links *app, Managed_Object marker_object)
#define BUFFER_GET_SETTING_SIG(n) bool32 n(Application_Links *app, Buffer_Summary *buffer, Buffer_Setting_ID setting, int32_t *value_out)
#define BUFFER_SET_SETTING_SIG(n) bool32 n(Application_Links *app, Buffer_Summary *buffer, Buffer_Setting_ID setting, int32_t value)
#define BUFFER_GET_MANAGED_SCOPE_SIG(n) Managed_Scope n(Application_Links *app, Buffer_ID buffer_id)
@ -62,8 +57,10 @@ struct Application_Links;
#define MANAGED_VARIABLE_SET_SIG(n) bool32 n(Application_Links *app, Managed_Scope scope, Managed_Variable_ID location, uint64_t value)
#define MANAGED_VARIABLE_GET_SIG(n) bool32 n(Application_Links *app, Managed_Scope scope, Managed_Variable_ID location, uint64_t *value_out)
#define MANAGED_MEMORY_ALLOC_SIG(n) Managed_Object n(Application_Links *app, Managed_Scope scope, int32_t size)
#define MANAGED_MEMORY_SET_SIG(n) bool32 n(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem)
#define MANAGED_MEMORY_GET_SIG(n) bool32 n(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem_out)
#define BUFFER_MARKERS_ALLOC_SIG(n) Managed_Object n(Application_Links *app, Buffer_ID buffer_id, int32_t count, Managed_Scope *scope)
#define MANAGED_OBJECT_FREE_SIG(n) bool32 n(Application_Links *app, Managed_Object object)
#define MANAGED_OBJECT_WRITE_SIG(n) bool32 n(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem)
#define MANAGED_OBJECT_READ_SIG(n) bool32 n(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem_out)
#define GET_USER_INPUT_SIG(n) User_Input n(Application_Links *app, Input_Type_Flag get_type, Input_Type_Flag abort_type)
#define GET_COMMAND_INPUT_SIG(n) User_Input n(Application_Links *app)
#define GET_MOUSE_STATE_SIG(n) Mouse_State n(Application_Links *app)
@ -121,11 +118,6 @@ typedef BUFFER_READ_RANGE_SIG(Buffer_Read_Range_Function);
typedef BUFFER_REPLACE_RANGE_SIG(Buffer_Replace_Range_Function);
typedef BUFFER_COMPUTE_CURSOR_SIG(Buffer_Compute_Cursor_Function);
typedef BUFFER_BATCH_EDIT_SIG(Buffer_Batch_Edit_Function);
typedef BUFFER_ADD_MARKERS_SIG(Buffer_Add_Markers_Function);
typedef GET_BUFFER_BY_MARKER_HANDLE_SIG(Get_Buffer_By_Marker_Handle_Function);
typedef BUFFER_SET_MARKERS_SIG(Buffer_Set_Markers_Function);
typedef BUFFER_GET_MARKERS_SIG(Buffer_Get_Markers_Function);
typedef BUFFER_REMOVE_MARKERS_SIG(Buffer_Remove_Markers_Function);
typedef BUFFER_GET_SETTING_SIG(Buffer_Get_Setting_Function);
typedef BUFFER_SET_SETTING_SIG(Buffer_Set_Setting_Function);
typedef BUFFER_GET_MANAGED_SCOPE_SIG(Buffer_Get_Managed_Scope_Function);
@ -166,8 +158,10 @@ typedef MANAGED_VARIABLE_CREATE_OR_GET_ID_SIG(Managed_Variable_Create_Or_Get_ID_
typedef MANAGED_VARIABLE_SET_SIG(Managed_Variable_Set_Function);
typedef MANAGED_VARIABLE_GET_SIG(Managed_Variable_Get_Function);
typedef MANAGED_MEMORY_ALLOC_SIG(Managed_Memory_Alloc_Function);
typedef MANAGED_MEMORY_SET_SIG(Managed_Memory_Set_Function);
typedef MANAGED_MEMORY_GET_SIG(Managed_Memory_Get_Function);
typedef BUFFER_MARKERS_ALLOC_SIG(Buffer_Markers_Alloc_Function);
typedef MANAGED_OBJECT_FREE_SIG(Managed_Object_Free_Function);
typedef MANAGED_OBJECT_WRITE_SIG(Managed_Object_Write_Function);
typedef MANAGED_OBJECT_READ_SIG(Managed_Object_Read_Function);
typedef GET_USER_INPUT_SIG(Get_User_Input_Function);
typedef GET_COMMAND_INPUT_SIG(Get_Command_Input_Function);
typedef GET_MOUSE_STATE_SIG(Get_Mouse_State_Function);
@ -227,11 +221,6 @@ Buffer_Read_Range_Function *buffer_read_range;
Buffer_Replace_Range_Function *buffer_replace_range;
Buffer_Compute_Cursor_Function *buffer_compute_cursor;
Buffer_Batch_Edit_Function *buffer_batch_edit;
Buffer_Add_Markers_Function *buffer_add_markers;
Get_Buffer_By_Marker_Handle_Function *get_buffer_by_marker_handle;
Buffer_Set_Markers_Function *buffer_set_markers;
Buffer_Get_Markers_Function *buffer_get_markers;
Buffer_Remove_Markers_Function *buffer_remove_markers;
Buffer_Get_Setting_Function *buffer_get_setting;
Buffer_Set_Setting_Function *buffer_set_setting;
Buffer_Get_Managed_Scope_Function *buffer_get_managed_scope;
@ -272,8 +261,10 @@ Managed_Variable_Create_Or_Get_ID_Function *managed_variable_create_or_get_id;
Managed_Variable_Set_Function *managed_variable_set;
Managed_Variable_Get_Function *managed_variable_get;
Managed_Memory_Alloc_Function *managed_memory_alloc;
Managed_Memory_Set_Function *managed_memory_set;
Managed_Memory_Get_Function *managed_memory_get;
Buffer_Markers_Alloc_Function *buffer_markers_alloc;
Managed_Object_Free_Function *managed_object_free;
Managed_Object_Write_Function *managed_object_write;
Managed_Object_Read_Function *managed_object_read;
Get_User_Input_Function *get_user_input;
Get_Command_Input_Function *get_command_input;
Get_Mouse_State_Function *get_mouse_state;
@ -332,11 +323,6 @@ Buffer_Read_Range_Function *buffer_read_range_;
Buffer_Replace_Range_Function *buffer_replace_range_;
Buffer_Compute_Cursor_Function *buffer_compute_cursor_;
Buffer_Batch_Edit_Function *buffer_batch_edit_;
Buffer_Add_Markers_Function *buffer_add_markers_;
Get_Buffer_By_Marker_Handle_Function *get_buffer_by_marker_handle_;
Buffer_Set_Markers_Function *buffer_set_markers_;
Buffer_Get_Markers_Function *buffer_get_markers_;
Buffer_Remove_Markers_Function *buffer_remove_markers_;
Buffer_Get_Setting_Function *buffer_get_setting_;
Buffer_Set_Setting_Function *buffer_set_setting_;
Buffer_Get_Managed_Scope_Function *buffer_get_managed_scope_;
@ -377,8 +363,10 @@ Managed_Variable_Create_Or_Get_ID_Function *managed_variable_create_or_get_id_;
Managed_Variable_Set_Function *managed_variable_set_;
Managed_Variable_Get_Function *managed_variable_get_;
Managed_Memory_Alloc_Function *managed_memory_alloc_;
Managed_Memory_Set_Function *managed_memory_set_;
Managed_Memory_Get_Function *managed_memory_get_;
Buffer_Markers_Alloc_Function *buffer_markers_alloc_;
Managed_Object_Free_Function *managed_object_free_;
Managed_Object_Write_Function *managed_object_write_;
Managed_Object_Read_Function *managed_object_read_;
Get_User_Input_Function *get_user_input_;
Get_Command_Input_Function *get_command_input_;
Get_Mouse_State_Function *get_mouse_state_;
@ -445,11 +433,6 @@ app_links->buffer_read_range_ = Buffer_Read_Range;\
app_links->buffer_replace_range_ = Buffer_Replace_Range;\
app_links->buffer_compute_cursor_ = Buffer_Compute_Cursor;\
app_links->buffer_batch_edit_ = Buffer_Batch_Edit;\
app_links->buffer_add_markers_ = Buffer_Add_Markers;\
app_links->get_buffer_by_marker_handle_ = Get_Buffer_By_Marker_Handle;\
app_links->buffer_set_markers_ = Buffer_Set_Markers;\
app_links->buffer_get_markers_ = Buffer_Get_Markers;\
app_links->buffer_remove_markers_ = Buffer_Remove_Markers;\
app_links->buffer_get_setting_ = Buffer_Get_Setting;\
app_links->buffer_set_setting_ = Buffer_Set_Setting;\
app_links->buffer_get_managed_scope_ = Buffer_Get_Managed_Scope;\
@ -490,8 +473,10 @@ app_links->managed_variable_create_or_get_id_ = Managed_Variable_Create_Or_Get_I
app_links->managed_variable_set_ = Managed_Variable_Set;\
app_links->managed_variable_get_ = Managed_Variable_Get;\
app_links->managed_memory_alloc_ = Managed_Memory_Alloc;\
app_links->managed_memory_set_ = Managed_Memory_Set;\
app_links->managed_memory_get_ = Managed_Memory_Get;\
app_links->buffer_markers_alloc_ = Buffer_Markers_Alloc;\
app_links->managed_object_free_ = Managed_Object_Free;\
app_links->managed_object_write_ = Managed_Object_Write;\
app_links->managed_object_read_ = Managed_Object_Read;\
app_links->get_user_input_ = Get_User_Input;\
app_links->get_command_input_ = Get_Command_Input;\
app_links->get_mouse_state_ = Get_Mouse_State;\
@ -550,11 +535,6 @@ static inline bool32 buffer_read_range(Application_Links *app, Buffer_Summary *b
static inline bool32 buffer_replace_range(Application_Links *app, Buffer_Summary *buffer, int32_t start, int32_t end, char *str, int32_t len){return(app->buffer_replace_range(app, buffer, start, end, str, len));}
static inline bool32 buffer_compute_cursor(Application_Links *app, Buffer_Summary *buffer, Buffer_Seek seek, Partial_Cursor *cursor_out){return(app->buffer_compute_cursor(app, buffer, seek, cursor_out));}
static inline bool32 buffer_batch_edit(Application_Links *app, Buffer_Summary *buffer, char *str, int32_t str_len, Buffer_Edit *edits, int32_t edit_count, Buffer_Batch_Edit_Type type){return(app->buffer_batch_edit(app, buffer, str, str_len, edits, edit_count, type));}
static inline Managed_Object buffer_add_markers(Application_Links *app, Buffer_ID buffer_id, uint32_t marker_count, Managed_Scope *scope){return(app->buffer_add_markers(app, buffer_id, marker_count, scope));}
static inline Buffer_Summary get_buffer_by_marker_handle(Application_Links *app, Managed_Object marker_object, Access_Flag access){return(app->get_buffer_by_marker_handle(app, marker_object, access));}
static inline bool32 buffer_set_markers(Application_Links *app, Managed_Object marker_object, uint32_t first_marker_index, uint32_t marker_count, Marker *source_markers){return(app->buffer_set_markers(app, marker_object, first_marker_index, marker_count, source_markers));}
static inline bool32 buffer_get_markers(Application_Links *app, Managed_Object marker_object, uint32_t first_marker_index, uint32_t marker_count, Marker *markers_out){return(app->buffer_get_markers(app, marker_object, first_marker_index, marker_count, markers_out));}
static inline bool32 buffer_remove_markers(Application_Links *app, Managed_Object marker_object){return(app->buffer_remove_markers(app, marker_object));}
static inline bool32 buffer_get_setting(Application_Links *app, Buffer_Summary *buffer, Buffer_Setting_ID setting, int32_t *value_out){return(app->buffer_get_setting(app, buffer, setting, value_out));}
static inline bool32 buffer_set_setting(Application_Links *app, Buffer_Summary *buffer, Buffer_Setting_ID setting, int32_t value){return(app->buffer_set_setting(app, buffer, setting, value));}
static inline Managed_Scope buffer_get_managed_scope(Application_Links *app, Buffer_ID buffer_id){return(app->buffer_get_managed_scope(app, buffer_id));}
@ -595,8 +575,10 @@ static inline int32_t managed_variable_create_or_get_id(Application_Links *app,
static inline bool32 managed_variable_set(Application_Links *app, Managed_Scope scope, Managed_Variable_ID location, uint64_t value){return(app->managed_variable_set(app, scope, location, value));}
static inline bool32 managed_variable_get(Application_Links *app, Managed_Scope scope, Managed_Variable_ID location, uint64_t *value_out){return(app->managed_variable_get(app, scope, location, value_out));}
static inline Managed_Object managed_memory_alloc(Application_Links *app, Managed_Scope scope, int32_t size){return(app->managed_memory_alloc(app, scope, size));}
static inline bool32 managed_memory_set(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem){return(app->managed_memory_set(app, object, start, size, mem));}
static inline bool32 managed_memory_get(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem_out){return(app->managed_memory_get(app, object, start, size, mem_out));}
static inline Managed_Object buffer_markers_alloc(Application_Links *app, Buffer_ID buffer_id, int32_t count, Managed_Scope *scope){return(app->buffer_markers_alloc(app, buffer_id, count, scope));}
static inline bool32 managed_object_free(Application_Links *app, Managed_Object object){return(app->managed_object_free(app, object));}
static inline bool32 managed_object_write(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem){return(app->managed_object_write(app, object, start, size, mem));}
static inline bool32 managed_object_read(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem_out){return(app->managed_object_read(app, object, start, size, mem_out));}
static inline User_Input get_user_input(Application_Links *app, Input_Type_Flag get_type, Input_Type_Flag abort_type){return(app->get_user_input(app, get_type, abort_type));}
static inline User_Input get_command_input(Application_Links *app){return(app->get_command_input(app));}
static inline Mouse_State get_mouse_state(Application_Links *app){return(app->get_mouse_state(app));}
@ -655,11 +637,6 @@ static inline bool32 buffer_read_range(Application_Links *app, Buffer_Summary *b
static inline bool32 buffer_replace_range(Application_Links *app, Buffer_Summary *buffer, int32_t start, int32_t end, char *str, int32_t len){return(app->buffer_replace_range_(app, buffer, start, end, str, len));}
static inline bool32 buffer_compute_cursor(Application_Links *app, Buffer_Summary *buffer, Buffer_Seek seek, Partial_Cursor *cursor_out){return(app->buffer_compute_cursor_(app, buffer, seek, cursor_out));}
static inline bool32 buffer_batch_edit(Application_Links *app, Buffer_Summary *buffer, char *str, int32_t str_len, Buffer_Edit *edits, int32_t edit_count, Buffer_Batch_Edit_Type type){return(app->buffer_batch_edit_(app, buffer, str, str_len, edits, edit_count, type));}
static inline Managed_Object buffer_add_markers(Application_Links *app, Buffer_ID buffer_id, uint32_t marker_count, Managed_Scope *scope){return(app->buffer_add_markers_(app, buffer_id, marker_count, scope));}
static inline Buffer_Summary get_buffer_by_marker_handle(Application_Links *app, Managed_Object marker_object, Access_Flag access){return(app->get_buffer_by_marker_handle_(app, marker_object, access));}
static inline bool32 buffer_set_markers(Application_Links *app, Managed_Object marker_object, uint32_t first_marker_index, uint32_t marker_count, Marker *source_markers){return(app->buffer_set_markers_(app, marker_object, first_marker_index, marker_count, source_markers));}
static inline bool32 buffer_get_markers(Application_Links *app, Managed_Object marker_object, uint32_t first_marker_index, uint32_t marker_count, Marker *markers_out){return(app->buffer_get_markers_(app, marker_object, first_marker_index, marker_count, markers_out));}
static inline bool32 buffer_remove_markers(Application_Links *app, Managed_Object marker_object){return(app->buffer_remove_markers_(app, marker_object));}
static inline bool32 buffer_get_setting(Application_Links *app, Buffer_Summary *buffer, Buffer_Setting_ID setting, int32_t *value_out){return(app->buffer_get_setting_(app, buffer, setting, value_out));}
static inline bool32 buffer_set_setting(Application_Links *app, Buffer_Summary *buffer, Buffer_Setting_ID setting, int32_t value){return(app->buffer_set_setting_(app, buffer, setting, value));}
static inline Managed_Scope buffer_get_managed_scope(Application_Links *app, Buffer_ID buffer_id){return(app->buffer_get_managed_scope_(app, buffer_id));}
@ -700,8 +677,10 @@ static inline int32_t managed_variable_create_or_get_id(Application_Links *app,
static inline bool32 managed_variable_set(Application_Links *app, Managed_Scope scope, Managed_Variable_ID location, uint64_t value){return(app->managed_variable_set_(app, scope, location, value));}
static inline bool32 managed_variable_get(Application_Links *app, Managed_Scope scope, Managed_Variable_ID location, uint64_t *value_out){return(app->managed_variable_get_(app, scope, location, value_out));}
static inline Managed_Object managed_memory_alloc(Application_Links *app, Managed_Scope scope, int32_t size){return(app->managed_memory_alloc_(app, scope, size));}
static inline bool32 managed_memory_set(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem){return(app->managed_memory_set_(app, object, start, size, mem));}
static inline bool32 managed_memory_get(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem_out){return(app->managed_memory_get_(app, object, start, size, mem_out));}
static inline Managed_Object buffer_markers_alloc(Application_Links *app, Buffer_ID buffer_id, int32_t count, Managed_Scope *scope){return(app->buffer_markers_alloc_(app, buffer_id, count, scope));}
static inline bool32 managed_object_free(Application_Links *app, Managed_Object object){return(app->managed_object_free_(app, object));}
static inline bool32 managed_object_write(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem){return(app->managed_object_write_(app, object, start, size, mem));}
static inline bool32 managed_object_read(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem_out){return(app->managed_object_read_(app, object, start, size, mem_out));}
static inline User_Input get_user_input(Application_Links *app, Input_Type_Flag get_type, Input_Type_Flag abort_type){return(app->get_user_input_(app, get_type, abort_type));}
static inline User_Input get_command_input(Application_Links *app){return(app->get_command_input_(app));}
static inline Mouse_State get_mouse_state(Application_Links *app){return(app->get_mouse_state_(app));}

View File

@ -227,39 +227,39 @@ static Command_Metadata fcoder_metacmd_table[202] = {
{ 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", 37, 722 },
{ 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", 37, 733 },
{ 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", 37, 712 },
{ 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", 39, 67 },
{ 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", 39, 73 },
{ 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", 30, 1247 },
{ 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", 39, 433 },
{ 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", 39, 439 },
{ 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", 40, 187 },
{ 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", 40, 155 },
{ 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", 39, 120 },
{ 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", 39, 126 },
{ 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", 43, 135 },
{ 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", 43, 145 },
{ 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", 40, 209 },
{ 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", 39, 368 },
{ 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", 39, 174 },
{ 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", 39, 187 },
{ 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", 39, 374 },
{ 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", 39, 180 },
{ 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", 39, 193 },
{ 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", 42, 1048 },
{ 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", 40, 203 },
{ 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", 39, 441 },
{ 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", 39, 447 },
{ PROC_LINKS(copy, 0), "copy", 4, "Copy the text in the range from the cursor to the mark onto the clipboard.", 74, "w:\\4ed\\code\\4coder_clipboard.cpp", 35, 26 },
{ PROC_LINKS(cursor_mark_swap, 0), "cursor_mark_swap", 16, "Swaps the position of the cursor and the mark.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 95 },
{ PROC_LINKS(cursor_mark_swap, 0), "cursor_mark_swap", 16, "Swaps the position of the cursor and the mark.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 101 },
{ PROC_LINKS(cut, 0), "cut", 3, "Cut the text in the range from the cursor to the mark onto the clipboard.", 73, "w:\\4ed\\code\\4coder_clipboard.cpp", 35, 35 },
{ PROC_LINKS(decrease_face_size, 0), "decrease_face_size", 18, "Decrease the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 531 },
{ PROC_LINKS(decrease_line_wrap, 0), "decrease_line_wrap", 18, "Decrases the current buffer's width for line wrapping.", 54, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 508 },
{ PROC_LINKS(delete_char, 0), "delete_char", 11, "Deletes the character to the right of the cursor.", 49, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 49 },
{ PROC_LINKS(decrease_face_size, 0), "decrease_face_size", 18, "Decrease the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 537 },
{ PROC_LINKS(decrease_line_wrap, 0), "decrease_line_wrap", 18, "Decrases the current buffer's width for line wrapping.", 54, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 514 },
{ PROC_LINKS(delete_char, 0), "delete_char", 11, "Deletes the character to the right of the cursor.", 49, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 55 },
{ PROC_LINKS(delete_current_scope, 0), "delete_current_scope", 20, "Deletes the braces surrounding the currently selected scope. Leaves the contents within the scope.", 99, "w:\\4ed\\code\\4coder_scope_commands.cpp", 40, 487 },
{ PROC_LINKS(delete_file_query, 0), "delete_file_query", 17, "Deletes the file of the current buffer if 4coder has the appropriate access rights. Will ask the user for confirmation first.", 125, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1024 },
{ PROC_LINKS(delete_line, 0), "delete_line", 11, "Delete the line the on which the cursor sits.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1274 },
{ PROC_LINKS(delete_range, 0), "delete_range", 12, "Deletes the text in the range between the cursor and the mark.", 62, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 107 },
{ PROC_LINKS(delete_file_query, 0), "delete_file_query", 17, "Deletes the file of the current buffer if 4coder has the appropriate access rights. Will ask the user for confirmation first.", 125, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1030 },
{ PROC_LINKS(delete_line, 0), "delete_line", 11, "Delete the line the on which the cursor sits.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1280 },
{ PROC_LINKS(delete_range, 0), "delete_range", 12, "Deletes the text in the range between the cursor and the mark.", 62, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 113 },
{ PROC_LINKS(delete_word, 0), "delete_word", 11, "Delete characters between the cursor position and the first alphanumeric boundary to the right.", 95, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1253 },
{ 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", 39, 1252 },
{ PROC_LINKS(eol_dosify, 0), "eol_dosify", 10, "Puts the buffer in DOS line ending mode.", 40, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 561 },
{ PROC_LINKS(eol_nixify, 0), "eol_nixify", 10, "Puts the buffer in NIX line ending mode.", 40, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 569 },
{ 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", 39, 1258 },
{ PROC_LINKS(eol_dosify, 0), "eol_dosify", 10, "Puts the buffer in DOS line ending mode.", 40, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 567 },
{ PROC_LINKS(eol_nixify, 0), "eol_nixify", 10, "Puts the buffer in NIX line ending mode.", 40, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 575 },
{ 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", 40, 23 },
{ PROC_LINKS(execute_arbitrary_command, 0), "execute_arbitrary_command", 25, "Execute a 'long form' command.", 30, "w:\\4ed\\code\\4coder_long_command_switch.cpp", 45, 8 },
{ 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", 40, 7 },
{ PROC_LINKS(exit_4coder, 0), "exit_4coder", 11, "Attempts to close 4coder.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 577 },
{ PROC_LINKS(exit_4coder, 0), "exit_4coder", 11, "Attempts to close 4coder.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 583 },
{ 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", 30, 1168 },
{ 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", 30, 1175 },
{ 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", 37, 84 },
@ -269,7 +269,7 @@ static Command_Metadata fcoder_metacmd_table[202] = {
{ 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", 37, 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", 37, 344 },
{ 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", 37, 316 },
{ 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", 39, 585 },
{ 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", 39, 591 },
{ 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", 37, 48 },
{ 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", 37, 66 },
{ 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", 37, 467 },
@ -278,21 +278,21 @@ static Command_Metadata fcoder_metacmd_table[202] = {
{ 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", 37, 75 },
{ 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", 37, 483 },
{ 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", 37, 453 },
{ 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", 39, 471 },
{ 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", 39, 457 },
{ 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", 39, 477 },
{ 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", 39, 463 },
{ PROC_LINKS(highlight_next_scope_absolute, 0), "highlight_next_scope_absolute", 29, "Finds the first scope started by '{' after the cursor and puts the cursor and mark on the '{' and '}'.", 102, "w:\\4ed\\code\\4coder_scope_commands.cpp", 40, 363 },
{ PROC_LINKS(highlight_prev_scope_absolute, 0), "highlight_prev_scope_absolute", 29, "Finds the first scope started by '{' before the cursor and puts the cursor and mark on the '{' and '}'.", 103, "w:\\4ed\\code\\4coder_scope_commands.cpp", 40, 382 },
{ PROC_LINKS(highlight_surrounding_scope, 0), "highlight_surrounding_scope", 27, "Finds the scope enclosed by '{' '}' surrounding the cursor and puts the cursor and mark on the '{' and '}'.", 107, "w:\\4ed\\code\\4coder_scope_commands.cpp", 40, 341 },
{ 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", 49, 82 },
{ PROC_LINKS(increase_face_size, 0), "increase_face_size", 18, "Increase the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 519 },
{ PROC_LINKS(increase_line_wrap, 0), "increase_line_wrap", 18, "Increases the current buffer's width for line wrapping.", 55, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 497 },
{ PROC_LINKS(increase_face_size, 0), "increase_face_size", 18, "Increase the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 525 },
{ PROC_LINKS(increase_line_wrap, 0), "increase_line_wrap", 18, "Increases the current buffer's width for line wrapping.", 55, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 503 },
{ PROC_LINKS(interactive_kill_buffer, 0), "interactive_kill_buffer", 23, "Interactively kill an open buffer.", 34, "w:\\4ed\\code\\4coder_lists.cpp", 31, 646 },
{ PROC_LINKS(interactive_new, 0), "interactive_new", 15, "Interactively creates a new file.", 33, "w:\\4ed\\code\\4coder_lists.cpp", 31, 748 },
{ PROC_LINKS(interactive_open, 0), "interactive_open", 16, "Interactively opens a file.", 27, "w:\\4ed\\code\\4coder_lists.cpp", 31, 775 },
{ PROC_LINKS(interactive_open_or_new, 0), "interactive_open_or_new", 23, "Interactively open a file out of the file system.", 49, "w:\\4ed\\code\\4coder_lists.cpp", 31, 715 },
{ PROC_LINKS(interactive_switch_buffer, 0), "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "w:\\4ed\\code\\4coder_lists.cpp", 31, 628 },
{ PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1444 },
{ 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", 39, 135 },
{ PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1450 },
{ 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", 39, 141 },
{ 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", 39, 318 },
{ 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", 32, 747 },
{ 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", 32, 759 },
@ -322,16 +322,16 @@ static Command_Metadata fcoder_metacmd_table[202] = {
{ PROC_LINKS(lister__write_character__file_path, 0), "lister__write_character__file_path", 34, "A lister mode command that inserts a character into the text field of a file system list.", 89, "w:\\4ed\\code\\4coder_lists.cpp", 31, 195 },
{ 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", 31, 255 },
{ 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", 42, 1071 },
{ 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", 39, 1132 },
{ PROC_LINKS(move_down, 0), "move_down", 9, "Moves the cursor down one line.", 31, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 250 },
{ PROC_LINKS(move_down_10, 0), "move_down_10", 12, "Moves the cursor down ten lines.", 32, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 262 },
{ PROC_LINKS(move_down_textual, 0), "move_down_textual", 17, "Moves down to the next line of actual text, regardless of line wrapping.", 72, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 268 },
{ PROC_LINKS(move_left, 0), "move_left", 9, "Moves the cursor one character to the left.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 299 },
{ PROC_LINKS(move_line_down, 0), "move_line_down", 14, "Swaps the line under the cursor with the line below it, and moves the cursor down with it.", 90, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1229 },
{ PROC_LINKS(move_line_up, 0), "move_line_up", 12, "Swaps the line under the cursor with the line above it, and moves the cursor up with it.", 88, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1165 },
{ PROC_LINKS(move_right, 0), "move_right", 10, "Moves the cursor one character to the right.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 308 },
{ PROC_LINKS(move_up, 0), "move_up", 7, "Moves the cursor up one line.", 29, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 244 },
{ PROC_LINKS(move_up_10, 0), "move_up_10", 10, "Moves the cursor up ten lines.", 30, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 256 },
{ 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", 39, 1138 },
{ PROC_LINKS(move_down, 0), "move_down", 9, "Moves the cursor down one line.", 31, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 256 },
{ PROC_LINKS(move_down_10, 0), "move_down_10", 12, "Moves the cursor down ten lines.", 32, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 268 },
{ PROC_LINKS(move_down_textual, 0), "move_down_textual", 17, "Moves down to the next line of actual text, regardless of line wrapping.", 72, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 274 },
{ PROC_LINKS(move_left, 0), "move_left", 9, "Moves the cursor one character to the left.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 305 },
{ PROC_LINKS(move_line_down, 0), "move_line_down", 14, "Swaps the line under the cursor with the line below it, and moves the cursor down with it.", 90, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1235 },
{ PROC_LINKS(move_line_up, 0), "move_line_up", 12, "Swaps the line under the cursor with the line above it, and moves the cursor up with it.", 88, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1171 },
{ PROC_LINKS(move_right, 0), "move_right", 10, "Moves the cursor one character to the right.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 314 },
{ PROC_LINKS(move_up, 0), "move_up", 7, "Moves the cursor up one line.", 29, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 250 },
{ PROC_LINKS(move_up_10, 0), "move_up_10", 10, "Moves the cursor up ten lines.", 30, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 262 },
{ 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", 37, 101 },
{ 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", 37, 116 },
{ 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", 37, 554 },
@ -339,16 +339,16 @@ static Command_Metadata fcoder_metacmd_table[202] = {
{ 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", 42, 1055 },
{ 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", 42, 1062 },
{ PROC_LINKS(open_color_tweaker, 0), "open_color_tweaker", 18, "Opens the 4coder theme selector list.", 37, "w:\\4ed\\code\\4coder_lists.cpp", 31, 791 },
{ 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", 39, 1351 },
{ 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", 39, 1502 },
{ 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", 39, 1357 },
{ 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", 39, 1508 },
{ 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", 49, 58 },
{ 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", 49, 74 },
{ 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", 49, 66 },
{ 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", 39, 1387 },
{ 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", 39, 1393 },
{ 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", 43, 164 },
{ 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", 43, 155 },
{ 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", 39, 288 },
{ 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", 39, 279 },
{ 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", 39, 294 },
{ 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", 39, 285 },
{ 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", 35, 46 },
{ PROC_LINKS(paste_and_indent, 0), "paste_and_indent", 16, "Paste from the top of clipboard and run auto-indent on the newly pasted text.", 77, "w:\\4ed\\code\\4coder_clipboard.cpp", 35, 131 },
{ PROC_LINKS(paste_next, 0), "paste_next", 10, "If the previous command was paste or paste_next, replaces the paste range with the next text down on the clipboard, otherwise operates as the paste command.", 156, "w:\\4ed\\code\\4coder_clipboard.cpp", 35, 83 },
@ -356,23 +356,23 @@ static Command_Metadata fcoder_metacmd_table[202] = {
{ PROC_LINKS(place_in_scope, 0), "place_in_scope", 14, "Wraps the code contained in the range between cursor and mark with a new curly brace scope.", 91, "w:\\4ed\\code\\4coder_scope_commands.cpp", 40, 481 },
{ PROC_LINKS(project_fkey_command, 0), "project_fkey_command", 20, "Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.", 175, "w:\\4ed\\code\\4coder_project_commands.cpp", 42, 1078 },
{ PROC_LINKS(project_go_to_root_directory, 0), "project_go_to_root_directory", 28, "Changes 4coder's hot directory to the root directory of the currently loaded project. With no loaded project nothing hapepns.", 125, "w:\\4ed\\code\\4coder_project_commands.cpp", 42, 1103 },
{ 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", 39, 912 },
{ 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", 39, 932 },
{ 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", 39, 950 },
{ PROC_LINKS(redo, 0), "redo", 4, "Advances forewards through the undo history.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1459 },
{ PROC_LINKS(reload_themes, 0), "reload_themes", 13, "Loads all the theme files in the theme folder, replacing duplicates with the new theme data.", 92, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1479 },
{ 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", 39, 918 },
{ 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", 39, 938 },
{ 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", 39, 956 },
{ PROC_LINKS(redo, 0), "redo", 4, "Advances forewards through the undo history.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1465 },
{ PROC_LINKS(reload_themes, 0), "reload_themes", 13, "Loads all the theme files in the theme folder, replacing duplicates with the new theme data.", 92, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1485 },
{ PROC_LINKS(remap_interactive, 0), "remap_interactive", 17, "Switch to a named key binding map.", 34, "w:\\4ed\\code\\4coder_default_framework.cpp", 43, 213 },
{ 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", 39, 1090 },
{ PROC_LINKS(reopen, 0), "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1465 },
{ PROC_LINKS(replace_in_range, 0), "replace_in_range", 16, "Queries the user for two strings, and replaces all occurences of the first string in the range between the cursor and the mark with the second string.", 150, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 810 },
{ PROC_LINKS(reverse_search, 0), "reverse_search", 14, "Begins an incremental search up through the current buffer for a user specified string.", 87, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 781 },
{ PROC_LINKS(reverse_search_identifier, 0), "reverse_search_identifier", 25, "Begins an incremental search up through the current buffer for the word or token under the cursor.", 98, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 799 },
{ PROC_LINKS(save, 0), "save", 4, "Saves the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1471 },
{ PROC_LINKS(save_all_dirty_buffers, 0), "save_all_dirty_buffers", 22, "Saves all buffers marked dirty (showing the '*' indicator).", 59, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 994 },
{ PROC_LINKS(save_to_query, 0), "save_to_query", 13, "Queries the user for a name and saves the contents of the current buffer, altering the buffer's name too.", 105, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1050 },
{ 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", 39, 1096 },
{ PROC_LINKS(reopen, 0), "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1471 },
{ PROC_LINKS(replace_in_range, 0), "replace_in_range", 16, "Queries the user for two strings, and replaces all occurences of the first string in the range between the cursor and the mark with the second string.", 150, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 816 },
{ PROC_LINKS(reverse_search, 0), "reverse_search", 14, "Begins an incremental search up through the current buffer for a user specified string.", 87, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 787 },
{ PROC_LINKS(reverse_search_identifier, 0), "reverse_search_identifier", 25, "Begins an incremental search up through the current buffer for the word or token under the cursor.", 98, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 805 },
{ PROC_LINKS(save, 0), "save", 4, "Saves the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1477 },
{ PROC_LINKS(save_all_dirty_buffers, 0), "save_all_dirty_buffers", 22, "Saves all buffers marked dirty (showing the '*' indicator).", 59, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1000 },
{ PROC_LINKS(save_to_query, 0), "save_to_query", 13, "Queries the user for a name and saves the contents of the current buffer, altering the buffer's name too.", 105, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1056 },
{ PROC_LINKS(scope_absorb_down, 0), "scope_absorb_down", 17, "If a scope is currently selected, and a statement or block statement is present below the current scope, the statement is moved into the scope.", 143, "w:\\4ed\\code\\4coder_scope_commands.cpp", 40, 738 },
{ PROC_LINKS(search, 0), "search", 6, "Begins an incremental search down through the current buffer for a user specified string.", 89, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 774 },
{ PROC_LINKS(search_identifier, 0), "search_identifier", 17, "Begins an incremental search down through the current buffer for the word or token under the cursor.", 100, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 788 },
{ PROC_LINKS(search, 0), "search", 6, "Begins an incremental search down through the current buffer for a user specified string.", 89, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 780 },
{ PROC_LINKS(search_identifier, 0), "search_identifier", 17, "Begins an incremental search down through the current buffer for the word or token under the cursor.", 100, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 794 },
{ PROC_LINKS(seek_alphanumeric_left, 0), "seek_alphanumeric_left", 22, "Seek left for boundary between alphanumeric characters and non-alphanumeric characters.", 87, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1227 },
{ PROC_LINKS(seek_alphanumeric_or_camel_left, 0), "seek_alphanumeric_or_camel_left", 31, "Seek left for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 106, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1239 },
{ PROC_LINKS(seek_alphanumeric_or_camel_right, 0), "seek_alphanumeric_or_camel_right", 32, "Seek right for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 107, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1233 },
@ -391,39 +391,39 @@ static Command_Metadata fcoder_metacmd_table[202] = {
{ PROC_LINKS(seek_whitespace_right, 0), "seek_whitespace_right", 21, "Seek right for the next boundary between whitespace and non-whitespace.", 71, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1185 },
{ PROC_LINKS(seek_whitespace_up, 0), "seek_whitespace_up", 18, "Seeks the cursor up to the next blank line.", 43, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1090 },
{ PROC_LINKS(seek_whitespace_up_end_line, 0), "seek_whitespace_up_end_line", 27, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1148 },
{ PROC_LINKS(select_all, 0), "select_all", 10, "Puts the cursor at the top of the file, and the mark at the bottom of the file.", 79, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 317 },
{ PROC_LINKS(select_all, 0), "select_all", 10, "Puts the cursor at the top of the file, and the mark at the bottom of the file.", 79, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 323 },
{ PROC_LINKS(set_bindings_choose, 0), "set_bindings_choose", 19, "Remap keybindings using the 'choose' mapping rule.", 50, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 44, 47 },
{ 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", 44, 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", 44, 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", 39, 86 },
{ 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", 39, 92 },
{ 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", 42, 1488 },
{ 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", 42, 1500 },
{ 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", 42, 1494 },
{ PROC_LINKS(setup_new_project, 0), "setup_new_project", 17, "Queries the user for several configuration options and initializes a new 4coder project with build scripts for every OS.", 120, "w:\\4ed\\code\\4coder_project_commands.cpp", 42, 1481 },
{ PROC_LINKS(show_filebar, 0), "show_filebar", 12, "Sets the current view to show it's filebar.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 464 },
{ PROC_LINKS(show_scrollbar, 0), "show_scrollbar", 14, "Sets the current view to show it's scrollbar.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 450 },
{ PROC_LINKS(show_filebar, 0), "show_filebar", 12, "Sets the current view to show it's filebar.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 470 },
{ PROC_LINKS(show_scrollbar, 0), "show_scrollbar", 14, "Sets the current view to show it's scrollbar.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 456 },
{ 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", 30, 1259 },
{ 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", 30, 1265 },
{ 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", 43, 187 },
{ 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", 39, 1411 },
{ 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", 39, 348 },
{ 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", 39, 328 },
{ 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", 39, 478 },
{ 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", 39, 1417 },
{ 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", 39, 354 },
{ 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", 39, 334 },
{ 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", 39, 484 },
{ 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", 43, 205 },
{ 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", 39, 487 },
{ 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", 39, 493 },
{ 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", 43, 199 },
{ 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", 39, 554 },
{ 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", 39, 543 },
{ PROC_LINKS(undo, 0), "undo", 4, "Advances backwards through the undo history.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1453 },
{ 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", 39, 1401 },
{ 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", 39, 560 },
{ 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", 39, 549 },
{ PROC_LINKS(undo, 0), "undo", 4, "Advances backwards through the undo history.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1459 },
{ 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", 39, 1407 },
{ 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", 32, 826 },
{ 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", 37, 745 },
{ PROC_LINKS(write_block, 0), "write_block", 11, "At the cursor, insert a block comment.", 38, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 49, 106 },
{ 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", 39, 33 },
{ 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", 39, 39 },
{ PROC_LINKS(write_hack, 0), "write_hack", 10, "At the cursor, insert a '// HACK' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 49, 94 },
{ PROC_LINKS(write_note, 0), "write_note", 10, "At the cursor, insert a '// NOTE' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 49, 100 },
{ PROC_LINKS(write_todo, 0), "write_todo", 10, "At the cursor, insert a '// TODO' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 49, 88 },
{ PROC_LINKS(write_underscore, 0), "write_underscore", 16, "Inserts an underscore.", 22, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 42 },
{ PROC_LINKS(write_underscore, 0), "write_underscore", 16, "Inserts an underscore.", 22, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 48 },
{ PROC_LINKS(write_zero_struct, 0), "write_zero_struct", 17, "At the cursor, insert a ' = {0};'.", 34, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 49, 112 },
};
static int32_t fcoder_metacmd_ID_allow_mouse = 0;

View File

@ -149,8 +149,8 @@ init_marker_list(Application_Links *app, Partition *scratch, Heap *heap, Buffer_
scope_array[1] = buffer_get_managed_scope(app, target_buffer_id);
Managed_Scope scope = get_intersected_managed_scope(app, scope_array, ArrayCount(scope_array));
Managed_Object marker_handle = buffer_add_markers(app, target_buffer_id, total_jump_count, &scope);
buffer_set_markers(app, marker_handle, 0, total_jump_count, markers);
Managed_Object marker_handle = buffer_markers_alloc(app, target_buffer_id, total_jump_count, &scope);
managed_object_write(app, marker_handle, 0, total_jump_count*sizeof(Marker), markers);
end_temp_memory(marker_temp);
sticky_jump_marker_handle_loc = managed_variable_create_or_get_id(app, sticky_jump_marker_handle_var, 0);
@ -158,7 +158,7 @@ init_marker_list(Application_Links *app, Partition *scratch, Heap *heap, Buffer_
}
Managed_Object stored_jump_array = managed_memory_alloc(app, scope_array[0], sizeof(Sticky_Jump_Stored)*jumps.count);
managed_memory_set(app, stored_jump_array, 0, sizeof(Sticky_Jump_Stored)*jumps.count, stored);
managed_object_write(app, stored_jump_array, 0, sizeof(Sticky_Jump_Stored)*jumps.count, stored);
end_temp_memory(temp);
@ -222,7 +222,7 @@ static bool32
get_stored_jump_from_list(Application_Links *app, Marker_List *list, int32_t index,
Sticky_Jump_Stored *stored_out){
Sticky_Jump_Stored stored = {0};
if (managed_memory_get(app, list->jump_array, index*sizeof(stored), sizeof(stored), &stored)){
if (managed_object_read(app, list->jump_array, index*sizeof(stored), sizeof(stored), &stored)){
*stored_out = stored;
return(true);
}
@ -234,7 +234,7 @@ get_all_stored_jumps_from_list(Application_Links *app, Partition *arena, Marker_
Temp_Memory restore_point = begin_temp_memory(arena);
Sticky_Jump_Stored *stored = push_array(arena, Sticky_Jump_Stored, list->jump_count);
if (stored != 0){
if (!managed_memory_get(app, list->jump_array, 0, sizeof(*stored)*list->jump_count, stored)){
if (!managed_object_read(app, list->jump_array, 0, sizeof(*stored)*list->jump_count, stored)){
stored = 0;
end_temp_memory(restore_point);
}
@ -257,7 +257,7 @@ get_jump_from_list(Application_Links *app, Marker_List *list, int32_t index, ID_
Managed_Object marker_array = 0;
if (managed_variable_get(app, scope, sticky_jump_marker_handle_loc, &marker_array)){
Marker marker = {0};
buffer_get_markers(app, marker_array, stored.index_into_marker_array, 1, &marker);
managed_object_read(app, marker_array, stored.index_into_marker_array*sizeof(Marker), 1*sizeof(Marker), &marker);
location->buffer_id = target_buffer_id;
location->pos = marker.pos;
return(true);

View File

@ -256,7 +256,7 @@ DOC_SEE(Command_Line_Interface_Flag)
Temp_Memory temp = begin_temp_memory(part);
{
{
// NOTE(allen): Check that it is possible to store a new child process.
if (!cli_list_has_space(&vars->cli_processes)){
append(&feedback_str, make_lit_string("ERROR: no available process slot\n"));
@ -337,7 +337,7 @@ DOC_SEE(Command_Line_Interface_Flag)
View *vptr = imp_get_view(cmd, view);
if (vptr != 0){
view_set_file(system, models, vptr, file);
// TODO(allen): // TODO(allen): // TODO(allen): // TODO(allen): // TODO(allen):
// TODO(allen): // TODO(allen): // TODO(allen): // TODO(allen): // TODO(allen):
// Send "quit UI" events!
}
}
@ -782,119 +782,6 @@ DOC_SEE(Buffer_Batch_Edit_Type)
return(result);
}
API_EXPORT Managed_Object
Buffer_Add_Markers(Application_Links *app, Buffer_ID buffer_id, uint32_t marker_count, Managed_Scope *scope)
/*
DOC_PARAM(buffer_id, The id of the buffer on which to add the new markers.)
DOC_PARAM(marker_count, How many markers to be stored in the new marker array.)
DOC_PARAM(scope, Optional dynamic scope tied to the marker's lifetime. Note this scope will be implicitly interesected with the scope tied to the target buffer.)
DOC_RETURN(If this call succeeds it returns a handle to the new markers. If it fails it returns a null handle.)
DOC(This call makes an allocation of markers for the specified buffer. The newly allocated markers are not immediately activated. To activate a marker use buffer_set_markers to give the marker a value. The markers will remain allocated on the buffer until buffer_remove_markers is called or until the buffer is killed.)
DOC_SEE(Marker)
*/{
Command_Data *cmd = (Command_Data*)app->cmd_context;
Models *models = cmd->models;
Editing_File *file = imp_get_file(cmd, buffer_id);
Managed_Object result = 0;
if (file != 0){
result = (Managed_Object)allocate_markers_state(&models->mem.heap, file, marker_count);
}
return(result);
}
API_EXPORT Buffer_Summary
Get_Buffer_By_Marker_Handle(Application_Links *app, Managed_Object marker_object, Access_Flag access)
/*
DOC_PARAM(marker_object, The marker handle to query.)
DOC_PARAM(access, The access parameter determines what levels of protection this call can access.)
DOC_SEE(Marker)
*/{
Buffer_Summary buffer = {0};
if (marker_object != 0){
void *ptr = IntAsPtr(marker_object);
Buffer_ID buffer_id = get_buffer_id_from_marker_handle(ptr);
buffer = Get_Buffer(app, buffer_id, access);
}
return(buffer);
}
API_EXPORT bool32
Buffer_Set_Markers(Application_Links *app, Managed_Object marker_object, uint32_t first_marker_index, uint32_t marker_count, Marker *source_markers)
/*
DOC_PARAM(marker_object, The marker handle refering to the markers to be set.)
DOC_PARAM(first_marker_index, The index of the first marker to be set by this call.)
DOC_PARAM(marker_count, The number of markers to be set by this call.)
DOC_PARAM(source_markers, An array of marker_count Markers to specify the values to set to the markers specified.)
DOC_RETURN(On success returns non-zero, on failure returns zero.)
DOC(This call sets the value of a Marker, eliminating whatever value was there before. Any markers that are set become active if they were not active before. If a marker of lower index than first_marker_index was not active before this call, it will be cleared to zero and made active as well, so that all markers between 0 and first_marker_index + marker_count - 1 are active after this call. If first_marker_index + marker_count exceeds the originally allocated size of the marker array, this call will fail.)
DOC_SEE(Marker)
*/{
Command_Data *cmd = (Command_Data*)app->cmd_context;
bool32 result = false;
if (marker_object != 0){
void *ptr = IntAsPtr(marker_object);
Buffer_ID buffer_id = get_buffer_id_from_marker_handle(ptr);
Editing_File *file = imp_get_file(cmd, buffer_id);
if (file != 0){
if (markers_set(file, ptr, first_marker_index, marker_count, source_markers)){
result = true;
}
}
}
return(result);
}
API_EXPORT bool32
Buffer_Get_Markers(Application_Links *app, Managed_Object marker_object, uint32_t first_marker_index, uint32_t marker_count, Marker *markers_out)
/*
DOC_PARAM(marker_object, The marker handle refering to the markers to be read.)
DOC_PARAM(first_marker_index, The index of the first marker to be read by this call.)
DOC_PARAM(marker_count, The number of markers to be read by this call.)
DOC_PARAM(markers_out, An array of marker_count Markers to be filled by the result of the read.)
DOC_RETURN(On success returns non-zero, on failure returns zero.)
DOC(When the range specified by first_marker_index and marker_count is a range of active markers in the array specified by the marker handle, this call succeeds and fills the markers_out buffer with the current values of the specified markers.)
DOC_SEE(Marker)
*/{
Command_Data *cmd = (Command_Data*)app->cmd_context;
bool32 result = false;
if (marker_object != 0){
void *ptr = IntAsPtr(marker_object);
Buffer_ID buffer_id = get_buffer_id_from_marker_handle(ptr);
Editing_File *file = imp_get_file(cmd, buffer_id);
if (file != 0){
if (markers_get(file, ptr, first_marker_index, marker_count, markers_out)){
result = true;
}
}
}
return(result);
}
API_EXPORT bool32
Buffer_Remove_Markers(Application_Links *app, Managed_Object marker_object)
/*
DOC_PARAM(buffer, The buffer on which the specified markers are attached.)
DOC_PARAM(marker_object, The marker handle refering to the markers to be detached from the buffer.)
DOC_RETURN(On success returns non-zero, on failure returns zero.)
DOC(Deactivates the entire range of markers specified by the marker handle and frees the memory used to store the markers internally.)
DOC_SEE(buffer_add_markers)
*/{
Command_Data *cmd = (Command_Data*)app->cmd_context;
Models *models = cmd->models;
bool32 result = false;
if (marker_object != 0){
void *ptr = IntAsPtr(marker_object);
Buffer_ID buffer_id = get_buffer_id_from_marker_handle(ptr);
Editing_File *file = imp_get_file(cmd, buffer_id);
if (file != 0){
if (markers_free(&models->mem.heap, file, ptr)){
result = true;
}
}
}
return(result);
}
API_EXPORT bool32
Buffer_Get_Setting(Application_Links *app, Buffer_Summary *buffer, Buffer_Setting_ID setting, int32_t *value_out)
/*
@ -1175,11 +1062,8 @@ DOC_SEE(Buffer_Setting_ID)
return(result);
}
API_EXPORT Managed_Scope
Buffer_Get_Managed_Scope(Application_Links *app, Buffer_ID buffer_id)
{
Command_Data *cmd = (Command_Data*)app->cmd_context;
Editing_File *file = imp_get_file(cmd, buffer_id);
internal Managed_Scope
buffer_get_managed_scope__inner(Editing_File *file){
Managed_Scope lifetime = 0;
if (file != 0){
Assert(file->lifetime_object != 0);
@ -1188,6 +1072,14 @@ Buffer_Get_Managed_Scope(Application_Links *app, Buffer_ID buffer_id)
return(lifetime);
}
API_EXPORT Managed_Scope
Buffer_Get_Managed_Scope(Application_Links *app, Buffer_ID buffer_id)
{
Command_Data *cmd = (Command_Data*)app->cmd_context;
Editing_File *file = imp_get_file(cmd, buffer_id);
return(buffer_get_managed_scope__inner(file));
}
API_EXPORT int32_t
Buffer_Token_Count(Application_Links *app, Buffer_Summary *buffer)
/*
@ -2145,7 +2037,7 @@ DOC_SEE(Set_Buffer_Flag)
if (file != vptr->transient.file_data.file){
view_set_file(system, models, vptr, file);
if (!(flags & SetBuffer_KeepOriginalGUI)){
// TODO(allen): // TODO(allen): // TODO(allen): // TODO(allen): // TODO(allen):
// TODO(allen): // TODO(allen): // TODO(allen): // TODO(allen): // TODO(allen):
// Send "quit UI" events!
}
}
@ -2502,15 +2394,75 @@ Managed_Memory_Alloc(Application_Links *app, Managed_Scope scope, int32_t size)
Dynamic_Workspace *workspace = get_dynamic_workspace(models, scope);
Managed_Object result = 0;
if (workspace != 0){
void *ptr = dynamic_memory_bank_allocate(heap, &workspace->mem_bank, size);
void *ptr = dynamic_memory_bank_allocate(heap, &workspace->mem_bank, size + sizeof(Managed_Memory_Header));
Managed_Memory_Header *header = (Managed_Memory_Header*)ptr;
header->type = ManagedObjectType_Memory;
header->size = size;
u32 id = dynamic_workspace_store_pointer(heap, workspace, ptr);
result = ((u64)scope << 32) | (u64)id;
}
return(result);
}
API_EXPORT Managed_Object
Buffer_Markers_Alloc(Application_Links *app, Buffer_ID buffer_id, int32_t count, Managed_Scope *scope)
{
Command_Data *cmd = (Command_Data*)app->cmd_context;
Editing_File *file = imp_get_file(cmd, buffer_id);
Managed_Scope markers_scope = buffer_get_managed_scope__inner(file);
if (scope != 0){
Managed_Object scope_array[2];
scope_array[0] = markers_scope;
scope_array[1] = *scope;
markers_scope = Get_Intersected_Managed_Scope(app, scope_array, 2);
}
Models *models = cmd->models;
Heap *heap = &models->mem.heap;
Dynamic_Workspace *workspace = get_dynamic_workspace(models, markers_scope);
Managed_Object result = 0;
if (workspace != 0){
i32 size = count*sizeof(Marker);
void *ptr = dynamic_memory_bank_allocate(heap, &workspace->mem_bank, size + sizeof(Managed_Buffer_Markers_Header));
Managed_Buffer_Markers_Header *header = (Managed_Buffer_Markers_Header*)ptr;
zdll_push_back(workspace->buffer_markers_list.first, workspace->buffer_markers_list.last, header);
workspace->buffer_markers_list.count += 1;
header->type = ManagedObjectType_Markers;
header->size = size;
header->buffer_id = buffer_id;
file->state.total_marker_count += count;
u32 id = dynamic_workspace_store_pointer(heap, workspace, ptr);
result = ((u64)markers_scope << 32) | (u64)id;
}
return(result);
}
API_EXPORT bool32
Managed_Object_Free(Application_Links *app, Managed_Object object)
{
Command_Data *cmd = (Command_Data*)app->cmd_context;
Models *models = cmd->models;
u32 hi_id = (object >> 32)&max_u32;
Dynamic_Workspace *workspace = get_dynamic_workspace(models, hi_id);
if (workspace != 0){
u32 lo_id = object&max_u32;
u8 *object_ptr = (u8*)dynamic_workspace_get_pointer(workspace, lo_id);
if (object_ptr != 0){
Managed_Object_Type *type = (Managed_Object_Type*)object_ptr;
if (*type == ManagedObjectType_Markers){
Managed_Buffer_Markers_Header *header = (Managed_Buffer_Markers_Header*)object_ptr;
zdll_remove(workspace->buffer_markers_list.first, workspace->buffer_markers_list.last, header);
workspace->buffer_markers_list.count -= 1;
}
dynamic_workspace_erase_pointer(workspace, lo_id);
dynamic_memory_bank_free(&workspace->mem_bank, object_ptr);
return(true);
}
}
return(false);
}
internal u8*
get_dynamic_object(Models *models, Managed_Object object){
get_dynamic_object_header_ptr(Models *models, Managed_Object object){
u32 hi_id = (object >> 32)&max_u32;
Dynamic_Workspace *workspace = get_dynamic_workspace(models, hi_id);
if (workspace != 0){
@ -2520,12 +2472,23 @@ get_dynamic_object(Models *models, Managed_Object object){
return(0);
}
internal u8*
get_dynamic_object_memory_ptr(u8 *header_ptr){
if (header_ptr != 0){
Managed_Object_Type *type = (Managed_Object_Type*)header_ptr;
if (0 < *type && *type < ManagedObjectType_COUNT){
return(header_ptr + managed_header_type_sizes[*type]);
}
}
return(0);
}
API_EXPORT bool32
Managed_Memory_Set(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem)
Managed_Object_Write(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem)
{
Command_Data *cmd = (Command_Data*)app->cmd_context;
Models *models = cmd->models;
u8 *ptr = get_dynamic_object(models, object);
u8 *ptr = get_dynamic_object_memory_ptr(get_dynamic_object_header_ptr(models, object));
if (ptr != 0){
memcpy(ptr + start, mem, size);
return(true);
@ -2534,11 +2497,11 @@ Managed_Memory_Set(Application_Links *app, Managed_Object object, uint32_t start
}
API_EXPORT bool32
Managed_Memory_Get(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem_out)
Managed_Object_Read(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem_out)
{
Command_Data *cmd = (Command_Data*)app->cmd_context;
Models *models = cmd->models;
u8 *ptr = get_dynamic_object(models, object);
u8 *ptr = get_dynamic_object_memory_ptr(get_dynamic_object_header_ptr(models, object));
if (ptr != 0){
memcpy(mem_out, ptr + start, size);
return(true);
@ -2569,8 +2532,8 @@ DOC_SEE(User_Input)
if (app->type_coroutine == Co_Command){
Assert(coroutine != 0);
*((u32*)coroutine->out+0) = get_type;
*((u32*)coroutine->out+1) = abort_type;
*((u32*)coroutine->out + 0) = get_type;
*((u32*)coroutine->out + 1) = abort_type;
system->yield_coroutine(coroutine);
result = *(User_Input*)coroutine->in;
}
@ -2586,12 +2549,10 @@ DOC_SEE(User_Input)
*/{
Command_Data *cmd = (Command_Data*)app->cmd_context;
User_Input result;
result.type = UserInputKey;
result.abort = 0;
result.key = cmd->key;
result.command.cmdid = 0;
return(result);
}
@ -2603,8 +2564,7 @@ DOC_SEE(Mouse_State)
*/{
Command_Data *cmd = (Command_Data*)app->cmd_context;
App_Vars *vars = cmd->vars;
Mouse_State mouse = direct_get_mouse_state(&vars->available_input);
return(mouse);
return(direct_get_mouse_state(&vars->available_input));
}
API_EXPORT bool32

View File

@ -129,16 +129,6 @@ dynamic_memory_bank_init(Heap *heap, Dynamic_Memory_Bank *mem_bank){
mem_bank->last = 0;
}
internal void
dynamic_memory_bank_free(Heap *heap, Dynamic_Memory_Bank *mem_bank){
for (Dynamic_Memory_Header *header = mem_bank->first, *next = 0;
header != 0;
header = next){
next = header->next;
heap_free(heap, header);
}
}
internal void*
dynamic_memory_bank_allocate(Heap *heap, Dynamic_Memory_Bank *bank, i32 size){
void *ptr = heap_allocate(&bank->heap, size);
@ -155,6 +145,21 @@ dynamic_memory_bank_allocate(Heap *heap, Dynamic_Memory_Bank *bank, i32 size){
return(ptr);
}
internal void
dynamic_memory_bank_free(Dynamic_Memory_Bank *bank, void *ptr){
heap_free(&bank->heap, ptr);
}
internal void
dynamic_memory_bank_free_all(Heap *heap, Dynamic_Memory_Bank *mem_bank){
for (Dynamic_Memory_Header *header = mem_bank->first, *next = 0;
header != 0;
header = next){
next = header->next;
heap_free(heap, header);
}
}
////////////////////////////////
internal void
@ -176,7 +181,7 @@ internal void
dynamic_workspace_free(Heap *heap, Lifetime_Allocator *lifetime_allocator, Dynamic_Workspace *workspace){
erase_u32_Ptr_table(&lifetime_allocator->scope_id_to_scope_ptr_table, workspace->scope_id);
dynamic_variables_block_free(heap, &workspace->var_block);
dynamic_memory_bank_free(heap, &workspace->mem_bank);
dynamic_memory_bank_free_all(heap, &workspace->mem_bank);
}
internal u32
@ -189,6 +194,11 @@ dynamic_workspace_store_pointer(Heap *heap, Dynamic_Workspace *workspace, void *
return(id);
}
internal void
dynamic_workspace_erase_pointer(Dynamic_Workspace *workspace, u32 id){
erase_u32_Ptr_table(&workspace->object_id_to_object_ptr, id);
}
internal void*
dynamic_workspace_get_pointer(Dynamic_Workspace *workspace, u32 id){
u32_Ptr_Lookup_Result lookup = lookup_u32_Ptr_table(&workspace->object_id_to_object_ptr, id);

View File

@ -12,6 +12,50 @@
#if !defined(FRED_DYNAMIC_VARIABLES_H)
#define FRED_DYNAMIC_VARIABLES_H
typedef i32 Managed_Object_Type;
enum{
ManagedObjectType_None = 0,
ManagedObjectType_Memory = 1,
ManagedObjectType_Markers = 2,
ManagedObjectType_COUNT = 3,
};
union Managed_Memory_Header{
Managed_Object_Type type;
u64 eight_byte_alignment__;
struct{
Managed_Object_Type type__;
i32 size;
};
};
union Managed_Buffer_Markers_Header{
Managed_Object_Type type;
u64 eight_byte_alignment__;
struct{
Managed_Object_Type type__;
Managed_Buffer_Markers_Header *next;
Managed_Buffer_Markers_Header *prev;
i32 size;
Buffer_ID buffer_id;
};
};
global_const i32 managed_header_type_sizes[ManagedObjectType_COUNT] = {
0,
sizeof(Managed_Memory_Header),
sizeof(Managed_Buffer_Markers_Header),
};
struct Managed_Buffer_Markers_Header_List{
Managed_Buffer_Markers_Header *first;
Managed_Buffer_Markers_Header *last;
i32 count;
};
////////////////////////////////
struct Dynamic_Variable_Slot{
Dynamic_Variable_Slot *next;
Dynamic_Variable_Slot *prev;
@ -53,6 +97,7 @@ struct Dynamic_Workspace{
u32 scope_id;
i32 user_type;
void *user_back_ptr;
Managed_Buffer_Markers_Header_List buffer_markers_list;
};
////////////////////////////////

View File

@ -24,6 +24,48 @@ edit_pre_maintenance(System_Functions *system, Heap *heap, Editing_File *file){
}
}
internal void
edit_fix_marks__write_workspace_marks(Dynamic_Workspace *workspace, Buffer_ID buffer_id,
Cursor_With_Index *cursors, Cursor_With_Index *r_cursors, i32 *cursor_count, i32 *r_cursor_count){
for (Managed_Buffer_Markers_Header *node = workspace->buffer_markers_list.first;
node != 0;
node = node->next){
if (node->buffer_id == buffer_id){
Marker *markers = (Marker*)(node + 1);
i32 count = node->size/sizeof(Marker);
for (i32 i = 0; i < count; i += 1){
if (markers[i].lean_right){
write_cursor_with_index(r_cursors, r_cursor_count, markers[i].pos);
}
else{
write_cursor_with_index(cursors , cursor_count , markers[i].pos);
}
}
}
}
}
internal void
edit_fix_marks__read_workspace_marks(Dynamic_Workspace *workspace, Buffer_ID buffer_id,
Cursor_With_Index *cursors, Cursor_With_Index *r_cursors, i32 *cursor_count, i32 *r_cursor_count){
for (Managed_Buffer_Markers_Header *node = workspace->buffer_markers_list.first;
node != 0;
node = node->next){
if (node->buffer_id == buffer_id){
Marker *markers = (Marker*)(node + 1);
i32 count = node->size/sizeof(Marker);
for (i32 i = 0; i < count; i += 1){
if (markers[i].lean_right){
markers[i].pos = r_cursors[(*r_cursor_count)++].pos;
}
else{
markers[i].pos = cursors[(*cursor_count)++].pos;
}
}
}
}
}
internal void
edit_fix_marks(System_Functions *system, Models *models, Editing_File *file, Editing_Layout *layout, Cursor_Fix_Descriptor desc){
@ -31,13 +73,13 @@ edit_fix_marks(System_Functions *system, Models *models, Editing_File *file, Edi
Temp_Memory cursor_temp = begin_temp_memory(part);
i32 cursor_max = layout->panel_max_count * 3;
cursor_max += file->markers.marker_count;
cursor_max += file->state.total_marker_count;
Cursor_With_Index *cursors = push_array(part, Cursor_With_Index, cursor_max);
Cursor_With_Index *r_cursors = push_array(part, Cursor_With_Index, cursor_max);
Assert(cursors != 0);
i32 cursor_count = 0;
i32 r_cursor_count = 0;
Assert(cursors != 0);
Assert(r_cursors != 0);
for (Panel *panel = layout->used_sentinel.next;
panel != &layout->used_sentinel;
@ -51,19 +93,24 @@ edit_fix_marks(System_Functions *system, Models *models, Editing_File *file, Edi
}
}
for (Marker_Array *marker_it = file->markers.sentinel.next;
marker_it != &file->markers.sentinel;
marker_it = marker_it->next){
u32 count = marker_it->count;
Marker *markers = MarkerArrayBase(marker_it);
for (u32 i = 0; i < count; ++i){
if (markers[i].lean_right){
write_cursor_with_index(r_cursors, &r_cursor_count, markers[i].pos);
}
else{
write_cursor_with_index(cursors, &cursor_count, markers[i].pos);
}
Lifetime_Object *file_lifetime_object = file->lifetime_object;
Assert(file_lifetime_object != 0);
edit_fix_marks__write_workspace_marks(&file_lifetime_object->workspace, file->id.id,
cursors, r_cursors, &cursor_count, &r_cursor_count);
i32 key_count = file_lifetime_object->key_count;
i32 key_index = 0;
for (Lifetime_Key_Ref_Node *key_node = file_lifetime_object->key_node_first;
key_node != 0;
key_node = key_node->next){
i32 count = clamp_top(lifetime_key_reference_per_node, key_count - key_index);
for (i32 i = 0; i < count; i += 1){
Lifetime_Key *key = key_node->keys[i];
edit_fix_marks__write_workspace_marks(&key->dynamic_workspace, file->id.id,
cursors, r_cursors, &cursor_count, &r_cursor_count);
}
key_index += count;
}
if (cursor_count > 0 || r_cursor_count > 0){
@ -114,19 +161,21 @@ edit_fix_marks(System_Functions *system, Models *models, Editing_File *file, Edi
}
}
for (Marker_Array *marker_it = file->markers.sentinel.next;
marker_it != &file->markers.sentinel;
marker_it = marker_it->next){
u32 count = marker_it->count;
Marker *markers = MarkerArrayBase(marker_it);
for (u32 i = 0; i < count; ++i){
if (markers[i].lean_right){
markers[i].pos = r_cursors[r_cursor_count++].pos;
}
else{
markers[i].pos = cursors[cursor_count++].pos;
}
edit_fix_marks__read_workspace_marks(&file_lifetime_object->workspace, file->id.id,
cursors, r_cursors, &cursor_count, &r_cursor_count);
i32 key_count = file_lifetime_object->key_count;
i32 key_index = 0;
for (Lifetime_Key_Ref_Node *key_node = file_lifetime_object->key_node_first;
key_node != 0;
key_node = key_node->next){
i32 count = clamp_top(lifetime_key_reference_per_node, key_count - key_index);
for (i32 i = 0; i < count; i += 1){
Lifetime_Key *key = key_node->keys[i];
edit_fix_marks__read_workspace_marks(&key->dynamic_workspace, file->id.id,
cursors, r_cursors, &cursor_count, &r_cursor_count);
}
key_index += count;
}
}

View File

@ -18,123 +18,6 @@ to_file_id(i32 id){
////////////////////////////////
internal void
init_file_markers_state(Editing_File_Markers *markers){
Marker_Array *sentinel = &markers->sentinel;
dll_init_sentinel(sentinel);
markers->array_count = 0;
markers->marker_count = 0;
}
internal void
clear_file_markers_state(Application_Links *app, Heap *heap, Editing_File_Markers *markers){
Marker_Array *sentinel = &markers->sentinel;
for (Marker_Array *marker_array = sentinel->next;
marker_array != sentinel;
marker_array = sentinel->next){
dll_remove(marker_array);
heap_free(heap, marker_array);
}
Assert(sentinel->next == sentinel);
Assert(sentinel->prev == sentinel);
markers->array_count = 0;
markers->marker_count = 0;
}
internal void*
allocate_markers_state(Heap *heap, Editing_File *file, u32 new_array_max){
u32 memory_size = sizeof(Marker_Array) + sizeof(Marker)*new_array_max;
Marker_Array *array = (Marker_Array*)heap_allocate(heap, memory_size);
dll_insert_back(&file->markers.sentinel, array);
array->buffer_id = file->id;
array->count = 0;
array->sim_max = new_array_max;
array->max = new_array_max;
++file->markers.array_count;
return(array);
}
internal Buffer_ID
get_buffer_id_from_marker_handle(void *handle){
Marker_Array *markers = (Marker_Array*)handle;
Buffer_Slot_ID result = markers->buffer_id;
return(result.id);
}
internal b32
markers_set(Editing_File *file, void *handle, u32 first_index, u32 count, Marker *source){
Assert(file != 0);
if (handle == 0){
return(false);
}
Marker_Array *markers = (Marker_Array*)handle;
if (markers->buffer_id.id != file->id.id){
return(false);
}
if (first_index + count > markers->sim_max){
return(false);
}
u32 new_count = first_index + count;
if (new_count > markers->count){
file->markers.marker_count += new_count - markers->count;
markers->count = new_count;
}
Marker *dst = MarkerArrayBase(markers);
memcpy(dst + first_index, source, sizeof(Marker)*count);
return(true);
}
internal b32
markers_get(Editing_File *file, void *handle, u32 first_index, u32 count, Marker *output){
Assert(file != 0);
if (handle == 0){
return(false);
}
Marker_Array *markers = (Marker_Array*)handle;
if (markers->buffer_id.id != file->id.id){
return(false);
}
if (first_index + count > markers->count){
return(false);
}
Marker *src = MarkerArrayBase(markers);
memcpy(output, src + first_index, sizeof(Marker)*count);
return(true);
}
internal b32
markers_free(Heap *heap, Editing_File *file, void *handle){
Assert(file != 0);
if (handle == 0){
return(false);
}
Marker_Array *markers = (Marker_Array*)handle;
if (markers->buffer_id.id != file->id.id){
return(false);
}
dll_remove(markers);
file->markers.marker_count -= markers->count;
--file->markers.array_count;
heap_free(heap, markers);
return(true);
}
////////////////////////////////
internal void
edit_pos_set_cursor(File_Edit_Positions *edit_pos, Full_Cursor cursor, b32 set_preferred_x, b32 unwrapped_lines){
edit_pos->cursor = cursor;
@ -683,8 +566,6 @@ file_free(System_Functions *system, Application_Links *app, Heap *heap, Editing_
heap_free(heap, file->state.token_array.tokens);
}
clear_file_markers_state(app, heap, &file->markers);
Gap_Buffer *buffer = &file->state.buffer;
if (buffer->data){
heap_free(heap, buffer->data);

View File

@ -39,23 +39,6 @@ union Buffer_Slot_ID{
i16 part[2];
};
struct Marker_Array{
Marker_Array *next;
Marker_Array *prev;
Buffer_Slot_ID buffer_id;
u32 count;
u32 sim_max;
u32 max;
};
#define MarkerArrayBase(a) (Marker*)((u8*)(a) + sizeof(Marker_Array))
struct Editing_File_Markers{
Marker_Array sentinel;
u32 array_count;
u32 marker_count;
};
struct Editing_File_Settings{
i32 base_map_id;
i32 display_width;
@ -93,6 +76,8 @@ struct Editing_File_State{
i32 wrap_position_count;
i32 wrap_position_max;
i32 total_marker_count;
Undo_Data undo;
Cpp_Token_Array token_array;
@ -129,7 +114,6 @@ struct Editing_File{
b32 is_dummy;
Editing_File_State state;
Lifetime_Object *lifetime_object;
Editing_File_Markers markers;
Editing_File_Name base_name;
Editing_File_Name unique_name;
Editing_File_Name canon;

View File

@ -87,7 +87,6 @@ working_set_alloc_always(Working_Set *working_set, Heap *heap, Lifetime_Allocato
result->settings.display_width = working_set->default_display_width;
result->settings.minimum_base_display_width = working_set->default_minimum_base_display_width;
result->settings.wrap_indicator = WrapIndicator_Show_At_Wrap_Edge;
init_file_markers_state(&result->markers);
result->lifetime_object = lifetime_alloc_object(heap, lifetime_allocator, DynamicWorkspace_Buffer, result);
++working_set->file_count;
}

View File

@ -248,11 +248,6 @@ generate_binding_list(char *code_directory, char *src_directory){
fclose(out);
}
#if 0
#endif
//
// Meta Parse Rules
//