diff --git a/4ed.cpp b/4ed.cpp index d56dc553..1bc1f93c 100644 --- a/4ed.cpp +++ b/4ed.cpp @@ -33,7 +33,7 @@ init_command_line_settings(App_Settings *settings, Plat_Settings *plat_settings, } } - switch (mode){ + switch (mode){ case CLMode_App: { switch (action){ diff --git a/bin/build_fusion.bat b/bin/build_fusion.bat index e3ccc5ee..7596f78c 100644 --- a/bin/build_fusion.bat +++ b/bin/build_fusion.bat @@ -1,5 +1,7 @@ @echo off -pushd ..\\build -..\\code\\custom\\bin\\buildsuper_x64-win.bat ..\\code\\fusion\\4coder_fusion.cpp -popd \ No newline at end of file +set code=%cd% +cd ..\\build +call %code%\\custom\\bin\\buildsuper_x64-win.bat %code%\\fusion\\4coder_fusion.cpp + +cd %code% diff --git a/custom/4coder_helper.cpp b/custom/4coder_helper.cpp index 7ce4b202..9a8df595 100644 --- a/custom/4coder_helper.cpp +++ b/custom/4coder_helper.cpp @@ -33,7 +33,7 @@ get_command_metadata(Custom_Command_Function *func){ //////////////////////////////// -internal Token_Array +function Token_Array get_token_array_from_buffer(Application_Links *app, Buffer_ID buffer){ Token_Array result = {}; Managed_Scope scope = buffer_get_managed_scope(app, buffer); @@ -50,22 +50,22 @@ get_token_array_from_buffer(Application_Links *app, Buffer_ID buffer){ //////////////////////////////// -internal Buffer_Seek +function Buffer_Seek seek_location(ID_Line_Column_Jump_Location location){ return(seek_line_col(location.line, location.column)); } -internal Buffer_Seek +function Buffer_Seek seek_location(ID_Pos_Jump_Location location){ return(seek_pos(location.pos)); } -internal Buffer_Seek +function Buffer_Seek seek_location(Name_Line_Column_Location location){ return(seek_line_col(location.line, location.column)); } -internal Buffer_Seek +function Buffer_Seek seek_jump(Parsed_Jump jump){ return(seek_location(jump.location)); } @@ -85,7 +85,7 @@ View_Context_Block::~View_Context_Block(){ //////////////////////////////// -internal Character_Predicate +function Character_Predicate character_predicate_from_function(Character_Predicate_Function *func){ Character_Predicate predicate = {}; i32 byte_index = 0; @@ -107,7 +107,7 @@ character_predicate_from_function(Character_Predicate_Function *func){ return(predicate); } -internal Character_Predicate +function Character_Predicate character_predicate_from_character(u8 character){ Character_Predicate predicate = {}; predicate.b[character/8] = (1 << (character%8)); @@ -116,7 +116,7 @@ character_predicate_from_character(u8 character){ #define character_predicate_check_character(p, c) (((p).b[(c)/8] & (1 << ((c)%8))) != 0) -internal Character_Predicate +function Character_Predicate character_predicate_or(Character_Predicate *a, Character_Predicate *b){ Character_Predicate p = {}; for (i32 i = 0; i < ArrayCount(p.b); i += 1){ @@ -125,7 +125,7 @@ character_predicate_or(Character_Predicate *a, Character_Predicate *b){ return(p); } -internal Character_Predicate +function Character_Predicate character_predicate_and(Character_Predicate *a, Character_Predicate *b){ Character_Predicate p = {}; for (i32 i = 0; i < ArrayCount(p.b); i += 1){ @@ -134,7 +134,7 @@ character_predicate_and(Character_Predicate *a, Character_Predicate *b){ return(p); } -internal Character_Predicate +function Character_Predicate character_predicate_not(Character_Predicate *a){ Character_Predicate p = {}; for (i32 i = 0; i < ArrayCount(p.b); i += 1){ @@ -143,7 +143,7 @@ character_predicate_not(Character_Predicate *a){ return(p); } -internal i64 +function i64 buffer_seek_character_class_change__inner(Application_Links *app, Buffer_ID buffer, Character_Predicate *positive, Character_Predicate *negative, Scan_Direction direction, i64 start_pos){ i64 pos = start_pos; switch (direction){ @@ -167,13 +167,13 @@ buffer_seek_character_class_change__inner(Application_Links *app, Buffer_ID buff return(pos); } -internal i64 +function i64 buffer_seek_character_class_change_1_0(Application_Links *app, Buffer_ID buffer, Character_Predicate *predicate, Scan_Direction direction, i64 start_pos){ Character_Predicate negative = character_predicate_not(predicate); return(buffer_seek_character_class_change__inner(app, buffer, predicate, &negative, direction, start_pos)); } -internal i64 +function i64 buffer_seek_character_class_change_0_1(Application_Links *app, Buffer_ID buffer, Character_Predicate *predicate, Scan_Direction direction, i64 start_pos){ Character_Predicate negative = character_predicate_not(predicate); return(buffer_seek_character_class_change__inner(app, buffer, &negative, predicate, direction, start_pos)); @@ -181,7 +181,7 @@ buffer_seek_character_class_change_0_1(Application_Links *app, Buffer_ID buffer, //////////////////////////////// -internal i64 +function i64 view_pos_from_xy(Application_Links *app, View_ID view, Vec2_f32 p){ Buffer_ID buffer = view_get_buffer(app, view, Access_ReadVisible); Rect_f32 region = view_get_buffer_region(app, view); @@ -193,7 +193,7 @@ view_pos_from_xy(Application_Links *app, View_ID view, Vec2_f32 p){ return(buffer_pos_at_relative_xy(app, buffer, width, face_id, line, p)); } -internal Buffer_Point +function Buffer_Point view_move_buffer_point(Application_Links *app, View_ID view, Buffer_Point buffer_point, Vec2_f32 delta){ delta += buffer_point.pixel_shift; Line_Shift_Vertical shift = view_line_shift_y(app, view, buffer_point.line_number, delta.y); @@ -202,19 +202,19 @@ view_move_buffer_point(Application_Links *app, View_ID view, Buffer_Point buffer return(buffer_point); } -internal void +function void view_zero_scroll(Application_Links *app, View_ID view){ Buffer_Scroll scroll = {}; view_set_buffer_scroll(app, view, scroll, SetBufferScroll_SnapCursorIntoView); } -internal Vec2_f32 +function Vec2_f32 view_relative_xy_of_pos(Application_Links *app, View_ID view, i64 base_line, i64 pos){ Rect_f32 rect = view_relative_box_of_pos(app, view, base_line, pos); return(rect_center(rect)); } -internal void +function void view_set_cursor_and_preferred_x(Application_Links *app, View_ID view, Buffer_Seek seek){ view_set_cursor(app, view, seek); Buffer_Cursor cursor = view_compute_cursor(app, view, seek); @@ -273,24 +273,24 @@ view_point_difference(Application_Links *app, View_ID view, Buffer_Point a, Buff //////////////////////////////// -internal Range_i64 +function Range_i64 buffer_range(Application_Links *app, Buffer_ID buffer){ Range_i64 range = {}; range.end = buffer_get_size(app, buffer); return(range); } -internal i64 +function i64 buffer_side(Application_Links *app, Buffer_ID buffer, Side side){ return(range_side(buffer_range(app, buffer), side)); } -internal Range_i64 +function Range_i64 get_view_range(Application_Links *app, View_ID view){ return(Ii64(view_get_cursor_pos(app, view), view_get_mark_pos(app, view))); } -internal void +function void set_view_range(Application_Links *app, View_ID view, Range_i64 range){ i64 c = view_get_cursor_pos(app, view); i64 m = view_get_mark_pos(app, view); @@ -304,44 +304,44 @@ set_view_range(Application_Links *app, View_ID view, Range_i64 range){ } } -internal b32 +function b32 is_valid_line(Application_Links *app, Buffer_ID buffer_id, i64 line){ i64 max_line = buffer_get_line_count(app, buffer_id); return(1 <= line && line <= max_line); } -internal b32 +function b32 is_valid_line_range(Application_Links *app, Buffer_ID buffer_id, Range_i64 range){ i64 max_line = buffer_get_line_count(app, buffer_id); return(1 <= range.first && range.first <= range.end && range.end <= max_line); } -internal i64 +function i64 get_line_number_from_pos(Application_Links *app, Buffer_ID buffer, i64 pos){ Buffer_Cursor cursor = buffer_compute_cursor(app, buffer, seek_pos(pos)); return(cursor.line); } -internal i64 +function i64 buffer_get_character_legal_pos_from_pos(Application_Links *app, Buffer_ID buffer, f32 width, Face_ID face, i64 pos){ Buffer_Cursor cursor = buffer_compute_cursor(app, buffer, seek_pos(pos)); i64 character = buffer_relative_character_from_pos(app, buffer, width, face, cursor.line, pos); return(buffer_pos_from_relative_character(app, buffer, width, face, cursor.line, character)); } -internal i64 +function i64 view_get_character_legal_pos_from_pos(Application_Links *app, View_ID view, i64 pos){ Buffer_Cursor cursor = view_compute_cursor(app, view, seek_pos(pos)); i64 character = view_relative_character_from_pos(app, view, cursor.line, pos); return(view_pos_from_relative_character(app, view, cursor.line, character)); } -internal Buffer_Cursor +function Buffer_Cursor get_line_side(Application_Links *app, Buffer_ID buffer, i64 line_number, Side side){ i64 character_index = (side == Side_Min)?(1):(-1); return(buffer_compute_cursor(app, buffer, seek_line_col(line_number, character_index))); } -internal i64 +function i64 get_line_side_pos(Application_Links *app, Buffer_ID buffer, i64 line_number, Side side){ i64 pos = -1; Buffer_Cursor cursor = get_line_side(app, buffer, line_number, side); @@ -351,28 +351,28 @@ get_line_side_pos(Application_Links *app, Buffer_ID buffer, i64 line_number, Sid return(pos); } -internal Buffer_Cursor +function Buffer_Cursor get_line_start(Application_Links *app, Buffer_ID buffer, i64 line_number){ return(get_line_side(app, buffer, line_number, Side_Min)); } -internal i64 +function i64 get_line_start_pos(Application_Links *app, Buffer_ID buffer, i64 line_number){ return(get_line_side_pos(app, buffer, line_number, Side_Min)); } // NOTE(allen): The position returned has the index of the terminating newline character, // not one past the newline character. -internal Buffer_Cursor +function Buffer_Cursor get_line_end(Application_Links *app, Buffer_ID buffer, i64 line_number){ return(get_line_side(app, buffer, line_number, Side_Max)); } -internal i64 +function i64 get_line_end_pos(Application_Links *app, Buffer_ID buffer, i64 line_number){ return(get_line_side_pos(app, buffer, line_number, Side_Max)); } // NOTE(allen): The range returned does not include the terminating newline character -internal Range_Cursor +function Range_Cursor get_line_range(Application_Links *app, Buffer_ID buffer, i64 line_number){ b32 success = false; Range_Cursor result = {}; @@ -390,7 +390,7 @@ get_line_range(Application_Links *app, Buffer_ID buffer, i64 line_number){ } // NOTE(allen): The range returned does not include the terminating newline character -internal Range_i64 +function Range_i64 get_line_pos_range(Application_Links *app, Buffer_ID buffer, i64 line_number){ Range_Cursor range = get_line_range(app, buffer, line_number); Range_i64 result = {}; @@ -400,26 +400,26 @@ get_line_pos_range(Application_Links *app, Buffer_ID buffer, i64 line_number){ return(result); } -internal Range_i64 +function Range_i64 make_range_from_cursors(Range_Cursor range){ return(Ii64(range.start.pos, range.end.pos)); } -internal i64 +function i64 get_line_side_pos_from_pos(Application_Links *app, Buffer_ID buffer, i64 pos, Side side){ i64 line_number = get_line_number_from_pos(app, buffer, pos); return(get_line_side_pos(app, buffer, line_number, side)); } -internal i64 +function i64 get_line_start_pos_from_pos(Application_Links *app, Buffer_ID buffer, i64 pos){ return(get_line_side_pos_from_pos(app, buffer, pos, Side_Min)); } -internal i64 +function i64 get_line_end_pos_from_pos(Application_Links *app, Buffer_ID buffer, i64 pos){ return(get_line_side_pos_from_pos(app, buffer, pos, Side_Max)); } -internal Token* +function Token* get_first_token_from_line(Application_Links *app, Buffer_ID buffer, Token_Array tokens, i64 line){ i64 line_start = get_line_start_pos(app, buffer, line); return(token_from_pos(&tokens, line_start)); @@ -427,7 +427,7 @@ get_first_token_from_line(Application_Links *app, Buffer_ID buffer, Token_Array //////////////////////////////// -internal i64 +function i64 scan_any_boundary(Application_Links *app, Boundary_Function *func, Buffer_ID buffer, Scan_Direction direction, i64 pos){ i64 a = func(app, buffer, Side_Min, direction, pos); i64 b = func(app, buffer, Side_Max, direction, pos); @@ -441,13 +441,13 @@ scan_any_boundary(Application_Links *app, Boundary_Function *func, Buffer_ID buf return(result); } -internal i64 +function i64 scan(Application_Links *app, Boundary_Function *func, Buffer_ID buffer, Scan_Direction direction, i64 pos){ Side side = (direction == Scan_Forward)?(Side_Max):(Side_Min); return(func(app, buffer, side, direction, pos)); } -internal i64 +function i64 scan(Application_Links *app, Boundary_Function_List funcs, Buffer_ID buffer, Scan_Direction direction, i64 start_pos){ i64 result = 0; if (direction == Scan_Forward){ @@ -472,7 +472,7 @@ scan(Application_Links *app, Boundary_Function_List funcs, Buffer_ID buffer, Sca return(result); } -internal void +function void push_boundary(Arena *arena, Boundary_Function_List *list, Boundary_Function *func){ Boundary_Function_Node *node = push_array(arena, Boundary_Function_Node, 1); sll_queue_push(list->first, list->last, node); @@ -480,7 +480,7 @@ push_boundary(Arena *arena, Boundary_Function_List *list, Boundary_Function *fun node->func = func; } -internal Boundary_Function_List +function Boundary_Function_List push_boundary_list__innerv(Arena *arena, va_list args){ Boundary_Function_List list = {}; for (;;){ @@ -492,7 +492,7 @@ push_boundary_list__innerv(Arena *arena, va_list args){ } return(list); } -internal Boundary_Function_List +function Boundary_Function_List push_boundary_list__inner(Arena *arena, ...){ va_list args; va_start(args, arena); @@ -502,7 +502,7 @@ push_boundary_list__inner(Arena *arena, ...){ } #define push_boundary_list(a,...) push_boundary_list__inner((a), __VA_ARGS__, 0) -internal i64 +function i64 boundary_predicate(Application_Links *app, Buffer_ID buffer, Side side, Scan_Direction direction, i64 pos, Character_Predicate *predicate){ i64 result = 0; switch (side){ @@ -518,20 +518,20 @@ boundary_predicate(Application_Links *app, Buffer_ID buffer, Side side, Scan_Dir return(result); } -internal i64 +function i64 boundary_non_whitespace(Application_Links *app, Buffer_ID buffer, Side side, Scan_Direction direction, i64 pos){ return(boundary_predicate(app, buffer, side, direction, pos, &character_predicate_non_whitespace)); } -internal i64 +function i64 boundary_base10(Application_Links *app, Buffer_ID buffer, Side side, Scan_Direction direction, i64 pos){ return(boundary_predicate(app, buffer, side, direction, pos, &character_predicate_base10)); } -internal i64 +function i64 boundary_base10_colon(Application_Links *app, Buffer_ID buffer, Side side, Scan_Direction direction, i64 pos){ - internal Character_Predicate predicate = {}; - internal b32 first_call = true; + function Character_Predicate predicate = {}; + function b32 first_call = true; if (first_call){ first_call = false; Character_Predicate colon = character_predicate_from_character((u8)':'); @@ -540,32 +540,32 @@ boundary_base10_colon(Application_Links *app, Buffer_ID buffer, Side side, Scan_ return(boundary_predicate(app, buffer, side, direction, pos, &predicate)); } -internal i64 +function i64 boundary_base16(Application_Links *app, Buffer_ID buffer, Side side, Scan_Direction direction, i64 pos){ return(boundary_predicate(app, buffer, side, direction, pos, &character_predicate_base16)); } -internal i64 +function i64 boundary_alpha_numeric(Application_Links *app, Buffer_ID buffer, Side side, Scan_Direction direction, i64 pos){ return(boundary_predicate(app, buffer, side, direction, pos, &character_predicate_alpha_numeric)); } -internal i64 +function i64 boundary_alpha_numeric_unicode(Application_Links *app, Buffer_ID buffer, Side side, Scan_Direction direction, i64 pos){ return(boundary_predicate(app, buffer, side, direction, pos, &character_predicate_alpha_numeric_underscore_utf8)); } -internal i64 +function i64 boundary_alpha_numeric_underscore(Application_Links *app, Buffer_ID buffer, Side side, Scan_Direction direction, i64 pos){ return(boundary_predicate(app, buffer, side, direction, pos, &character_predicate_alpha_numeric_underscore)); } -internal i64 +function i64 boundary_alpha_numeric_underscore_utf8(Application_Links *app, Buffer_ID buffer, Side side, Scan_Direction direction, i64 pos){ return(boundary_predicate(app, buffer, side, direction, pos, &character_predicate_alpha_numeric_underscore_utf8)); } -internal i64 +function i64 boundary_alpha_numeric_camel(Application_Links *app, Buffer_ID buffer, Side side, Scan_Direction direction, i64 pos){ i64 an_pos = boundary_alpha_numeric(app, buffer, side, direction, pos); String_Match m = buffer_seek_character_class(app, buffer, &character_predicate_uppercase, direction, pos); @@ -587,10 +587,10 @@ boundary_alpha_numeric_camel(Application_Links *app, Buffer_ID buffer, Side side return(result); } -internal i64 +function i64 boundary_inside_quotes(Application_Links *app, Buffer_ID buffer, Side side, Scan_Direction direction, i64 pos){ - internal Character_Predicate predicate = {}; - internal b32 first_call = true; + function Character_Predicate predicate = {}; + function b32 first_call = true; if (first_call){ first_call = false; predicate = character_predicate_from_character((u8)'"'); @@ -599,7 +599,7 @@ boundary_inside_quotes(Application_Links *app, Buffer_ID buffer, Side side, Scan return(boundary_predicate(app, buffer, side, direction, pos, &predicate)); } -internal i64 +function i64 boundary_token(Application_Links *app, Buffer_ID buffer, Side side, Scan_Direction direction, i64 pos){ i64 result = boundary_non_whitespace(app, buffer, side, direction, pos); Token_Array tokens = get_token_array_from_buffer(app, buffer); @@ -666,7 +666,7 @@ boundary_token(Application_Links *app, Buffer_ID buffer, Side side, Scan_Directi return(result); } -internal i64 +function i64 boundary_line(Application_Links *app, Buffer_ID buffer, Side side, Scan_Direction direction, i64 pos){ i64 line_number = get_line_number_from_pos(app, buffer, pos); i64 new_pos = get_line_side_pos(app, buffer, line_number, side); @@ -690,7 +690,7 @@ boundary_line(Application_Links *app, Buffer_ID buffer, Side side, Scan_Directio //////////////////////////////// // TODO(allen): these need a little more rewrite -internal void +function void seek_string_forward(Application_Links *app, Buffer_ID buffer, i64 pos, i64 end, String_Const_u8 needle, i64 *result){ if (end == 0){ end = (i32)buffer_get_size(app, buffer); @@ -710,7 +710,7 @@ seek_string_forward(Application_Links *app, Buffer_ID buffer, i64 pos, i64 end, } } -internal void +function void seek_string_backward(Application_Links *app, Buffer_ID buffer, i64 pos, i64 min, String_Const_u8 needle, i64 *result){ String_Match match = {}; match.range.first = pos; @@ -727,7 +727,7 @@ seek_string_backward(Application_Links *app, Buffer_ID buffer, i64 pos, i64 min, } } -internal void +function void seek_string_insensitive_forward(Application_Links *app, Buffer_ID buffer, i64 pos, i64 end, String_Const_u8 needle, i64 *result){ if (end == 0){ end = (i32)buffer_get_size(app, buffer); @@ -741,7 +741,7 @@ seek_string_insensitive_forward(Application_Links *app, Buffer_ID buffer, i64 po } } -internal void +function void seek_string_insensitive_backward(Application_Links *app, Buffer_ID buffer, i64 pos, i64 min, String_Const_u8 needle, i64 *result){ String_Match match = buffer_seek_string(app, buffer, needle, Scan_Backward, pos); if (match.range.first >= min && match.buffer == buffer){ @@ -752,7 +752,7 @@ seek_string_insensitive_backward(Application_Links *app, Buffer_ID buffer, i64 p } } -internal void +function void seek_string(Application_Links *app, Buffer_ID buffer_id, i64 pos, i64 end, i64 min, String_Const_u8 str, i64 *result, Buffer_Seek_String_Flags flags){ switch (flags & 3){ case 0: @@ -779,7 +779,7 @@ seek_string(Application_Links *app, Buffer_ID buffer_id, i64 pos, i64 end, i64 m //////////////////////////////// -internal Range_i64 +function Range_i64 get_line_range_from_pos_range(Application_Links *app, Buffer_ID buffer, Range_i64 pos_range){ Range_i64 line_range = {}; line_range.first = get_line_number_from_pos(app, buffer, pos_range.first); @@ -794,7 +794,7 @@ get_line_range_from_pos_range(Application_Links *app, Buffer_ID buffer, Range_i6 // NOTE(allen): The end of the returned range does not include the terminating newline character of // the last line. -internal Range_i64 +function Range_i64 get_pos_range_from_line_range(Application_Links *app, Buffer_ID buffer, Range_i64 line_range){ Range_i64 pos_range = {}; if (is_valid_line_range(app, buffer, line_range)){ @@ -804,7 +804,7 @@ get_pos_range_from_line_range(Application_Links *app, Buffer_ID buffer, Range_i6 return(pos_range); } -internal Range_i64 +function Range_i64 enclose_boundary(Application_Links *app, Buffer_ID buffer, Range_i64 range, Boundary_Function *func){ i64 new_min = func(app, buffer, Side_Min, Scan_Backward, range.min + 1); @@ -820,7 +820,7 @@ enclose_boundary(Application_Links *app, Buffer_ID buffer, Range_i64 range, return(range); } -internal Range_i64 +function Range_i64 left_enclose_boundary(Application_Links *app, Buffer_ID buffer, Range_i64 range, Boundary_Function *func){ i64 new_min = func(app, buffer, Side_Min, Scan_Backward, range.min + 1); @@ -831,7 +831,7 @@ left_enclose_boundary(Application_Links *app, Buffer_ID buffer, Range_i64 range, return(range); } -internal Range_i64 +function Range_i64 right_enclose_boundary(Application_Links *app, Buffer_ID buffer, Range_i64 range, Boundary_Function *func){ i64 new_max = func(app, buffer, Side_Max, Scan_Forward, range.max - 1); @@ -842,124 +842,124 @@ right_enclose_boundary(Application_Links *app, Buffer_ID buffer, Range_i64 range return(range); } -internal Range_i64 +function Range_i64 enclose_non_whitespace(Application_Links *app, Buffer_ID buffer, Range_i64 range){ return(enclose_boundary(app, buffer, range, boundary_non_whitespace)); } -internal Range_i64 +function Range_i64 enclose_pos_non_whitespace(Application_Links *app, Buffer_ID buffer, i64 pos){ return(enclose_boundary(app, buffer, Ii64(pos), boundary_non_whitespace)); } -internal Range_i64 +function Range_i64 enclose_tokens(Application_Links *app, Buffer_ID buffer, Range_i64 range){ return(enclose_boundary(app, buffer, range, boundary_token)); } -internal Range_i64 +function Range_i64 enclose_pos_tokens(Application_Links *app, Buffer_ID buffer, i64 pos){ return(enclose_boundary(app, buffer, Ii64(pos), boundary_token)); } -internal Range_i64 +function Range_i64 enclose_base10(Application_Links *app, Buffer_ID buffer, Range_i64 range){ return(enclose_boundary(app, buffer, range, boundary_base10)); } -internal Range_i64 +function Range_i64 enclose_pos_base10(Application_Links *app, Buffer_ID buffer, i64 pos){ return(enclose_boundary(app, buffer, Ii64(pos), boundary_base10)); } -internal Range_i64 +function Range_i64 enclose_base16(Application_Links *app, Buffer_ID buffer, Range_i64 range){ return(enclose_boundary(app, buffer, range, boundary_base16)); } -internal Range_i64 +function Range_i64 enclose_pos_base16(Application_Links *app, Buffer_ID buffer, i64 pos){ return(enclose_boundary(app, buffer, Ii64(pos), boundary_base16)); } -internal Range_i64 +function Range_i64 enclose_base10_colon(Application_Links *app, Buffer_ID buffer, Range_i64 range){ return(enclose_boundary(app, buffer, range, boundary_base10_colon)); } -internal Range_i64 +function Range_i64 enclose_pos_base10_colon(Application_Links *app, Buffer_ID buffer, i64 pos){ return(enclose_boundary(app, buffer, Ii64(pos), boundary_base10_colon)); } -internal Range_i64 +function Range_i64 enclose_alpha_numeric(Application_Links *app, Buffer_ID buffer, Range_i64 range){ return(enclose_boundary(app, buffer, range, boundary_alpha_numeric)); } -internal Range_i64 +function Range_i64 enclose_pos_alpha_numeric(Application_Links *app, Buffer_ID buffer, i64 pos){ return(enclose_boundary(app, buffer, Ii64(pos), boundary_alpha_numeric)); } -internal Range_i64 +function Range_i64 enclose_alpha_numeric_unicode(Application_Links *app, Buffer_ID buffer, Range_i64 range){ return(enclose_boundary(app, buffer, range, boundary_alpha_numeric_unicode)); } -internal Range_i64 +function Range_i64 enclose_pos_alpha_numeric_unicode(Application_Links *app, Buffer_ID buffer, i64 pos){ return(enclose_boundary(app, buffer, Ii64(pos), boundary_alpha_numeric_unicode)); } -internal Range_i64 +function Range_i64 enclose_alpha_numeric_underscore(Application_Links *app, Buffer_ID buffer, Range_i64 range){ return(enclose_boundary(app, buffer, range, boundary_alpha_numeric_underscore)); } -internal Range_i64 +function Range_i64 enclose_pos_alpha_numeric_underscore(Application_Links *app, Buffer_ID buffer, i64 pos){ return(enclose_boundary(app, buffer, Ii64(pos), boundary_alpha_numeric_underscore)); } -internal Range_i64 +function Range_i64 right_enclose_alpha_numeric_underscore(Application_Links *app, Buffer_ID buffer, Range_i64 range){ return(right_enclose_boundary(app, buffer, range, boundary_alpha_numeric_underscore)); } -internal Range_i64 +function Range_i64 enclose_alpha_numeric_underscore_utf8(Application_Links *app, Buffer_ID buffer, Range_i64 range){ return(enclose_boundary(app, buffer, range, boundary_alpha_numeric_underscore_utf8)); } -internal Range_i64 +function Range_i64 enclose_pos_alpha_numeric_underscore_utf8(Application_Links *app, Buffer_ID buffer, i64 pos){ return(enclose_boundary(app, buffer, Ii64(pos), boundary_alpha_numeric_underscore_utf8)); } -internal Range_i64 +function Range_i64 right_enclose_alpha_numeric_underscore_utf8(Application_Links *app, Buffer_ID buffer, Range_i64 range){ return(right_enclose_boundary(app, buffer, range, boundary_alpha_numeric_underscore_utf8)); } -internal Range_i64 +function Range_i64 enclose_alpha_numeric_camel(Application_Links *app, Buffer_ID buffer, Range_i64 range){ return(enclose_boundary(app, buffer, range, boundary_alpha_numeric_camel)); } -internal Range_i64 +function Range_i64 enclose_pos_alpha_numeric_camel(Application_Links *app, Buffer_ID buffer, i64 pos){ return(enclose_boundary(app, buffer, Ii64(pos), boundary_alpha_numeric_camel)); } -internal Range_i64 +function Range_i64 enclose_pos_inside_quotes(Application_Links *app, Buffer_ID buffer, i64 pos){ return(enclose_boundary(app, buffer, Ii64(pos), boundary_inside_quotes)); } -internal Range_i64 +function Range_i64 enclose_whole_lines(Application_Links *app, Buffer_ID buffer, Range_i64 range){ return(enclose_boundary(app, buffer, range, boundary_line)); } -internal Range_i64 +function Range_i64 enclose_pos_whole_lines(Application_Links *app, Buffer_ID buffer, i64 pos){ return(enclose_boundary(app, buffer, Ii64(pos), boundary_line)); } //////////////////////////////// -internal Range_i64 +function Range_i64 get_snipe_range(Application_Links *app, Boundary_Function_List funcs, Buffer_ID buffer, i64 pos, Scan_Direction direction){ Range_i64 result = {}; i64 buffer_size = buffer_get_size(app, buffer); @@ -980,7 +980,7 @@ get_snipe_range(Application_Links *app, Boundary_Function_List funcs, Buffer_ID return(result); } -internal Range_i64 +function Range_i64 get_snipe_range(Application_Links *app, Boundary_Function *func, Buffer_ID buffer, i64 pos, Scan_Direction direction){ Scratch_Block scratch(app); return(get_snipe_range(app, push_boundary_list(scratch, func), buffer, pos, direction)); @@ -988,7 +988,7 @@ get_snipe_range(Application_Links *app, Boundary_Function *func, Buffer_ID buffe //////////////////////////////// -internal String_Const_u8 +function String_Const_u8 push_buffer_range(Application_Links *app, Arena *arena, Buffer_ID buffer, Range_i64 range){ String_Const_u8 result = {}; i64 length = range_size(range); @@ -1005,34 +1005,34 @@ push_buffer_range(Application_Links *app, Arena *arena, Buffer_ID buffer, Range_ return(result); } -internal String_Const_u8 +function String_Const_u8 push_token_lexeme(Application_Links *app, Arena *arena, Buffer_ID buffer, Token *token){ return(push_buffer_range(app, arena, buffer, Ii64(token))); } -internal String_Const_u8 +function String_Const_u8 push_buffer_line(Application_Links *app, Arena *arena, Buffer_ID buffer, i64 line_number){ return(push_buffer_range(app, arena, buffer, get_line_pos_range(app, buffer, line_number))); } -internal String_Const_u8 +function String_Const_u8 push_whole_buffer(Application_Links *app, Arena *arena, Buffer_ID buffer){ return(push_buffer_range(app, arena, buffer, buffer_range(app, buffer))); } -internal String_Const_u8 +function String_Const_u8 push_view_range_string(Application_Links *app, Arena *arena, View_ID view){ Buffer_ID buffer = view_get_buffer(app, view, Access_ReadVisible); return(push_buffer_range(app, arena, buffer, get_view_range(app, view))); } -internal String_Const_u8 +function String_Const_u8 push_view_range_string(Application_Links *app, Arena *arena){ View_ID view = get_active_view(app, Access_Always); return(push_view_range_string(app, arena, view)); } -internal String_Const_u8 +function String_Const_u8 push_enclose_range_at_pos(Application_Links *app, Arena *arena, Buffer_ID buffer, i64 pos, Enclose_Function *enclose){ Range_i64 range = enclose(app, buffer, Ii64(pos)); return(push_buffer_range(app, arena, buffer, range)); @@ -1040,7 +1040,7 @@ push_enclose_range_at_pos(Application_Links *app, Arena *arena, Buffer_ID buffer //////////////////////////////// -internal String_Const_u8 +function String_Const_u8 token_it_lexeme(Application_Links *app, Arena *arena, Token_Iterator_Array *it){ String_Const_u8 result = {}; Token *token = token_it_read(it); @@ -1050,7 +1050,7 @@ token_it_lexeme(Application_Links *app, Arena *arena, Token_Iterator_Array *it){ return(result); } -internal b32 +function b32 token_it_check_and_get_lexeme(Application_Links *app, Arena *arena, Token_Iterator_Array *it, Token_Base_Kind kind, String_Const_u8 *lexeme_out){ Token *token = token_it_read(it); b32 result = {}; @@ -1061,7 +1061,7 @@ token_it_check_and_get_lexeme(Application_Links *app, Arena *arena, Token_Iterat return(result); } -internal String_Const_u8 +function String_Const_u8 token_it_lexeme(Application_Links *app, Arena *arena, Token_Iterator_List *it){ String_Const_u8 result = {}; Token *token = token_it_read(it); @@ -1071,7 +1071,7 @@ token_it_lexeme(Application_Links *app, Arena *arena, Token_Iterator_List *it){ return(result); } -internal b32 +function b32 token_it_check_and_get_lexeme(Application_Links *app, Arena *arena, Token_Iterator_List *it, Token_Base_Kind kind, String_Const_u8 *lexeme_out){ Token *token = token_it_read(it); b32 result = {}; @@ -1084,14 +1084,14 @@ token_it_check_and_get_lexeme(Application_Links *app, Arena *arena, Token_Iterat //////////////////////////////// -internal b32 +function b32 buffer_has_name_with_star(Application_Links *app, Buffer_ID buffer){ Scratch_Block scratch(app); String_Const_u8 str = push_buffer_unique_name(app, scratch, buffer); return(str.size > 0 && str.str[0] == '*'); } -internal u8 +function u8 buffer_get_char(Application_Links *app, Buffer_ID buffer_id, i64 pos){ i64 buffer_size = buffer_get_size(app, buffer_id); u8 result = ' '; @@ -1101,7 +1101,7 @@ buffer_get_char(Application_Links *app, Buffer_ID buffer_id, i64 pos){ return(result); } -internal b32 +function b32 line_is_valid_and_blank(Application_Links *app, Buffer_ID buffer, i64 line_number){ b32 result = false; if (is_valid_line(app, buffer, line_number)){ @@ -1120,7 +1120,7 @@ line_is_valid_and_blank(Application_Links *app, Buffer_ID buffer, i64 line_numbe //////////////////////////////// -internal i64 +function i64 get_pos_past_lead_whitespace_from_line_number(Application_Links *app, Buffer_ID buffer, i64 line_number){ Scratch_Block scratch(app); Range_i64 line_range = get_line_pos_range(app, buffer, line_number); @@ -1135,7 +1135,7 @@ get_pos_past_lead_whitespace_from_line_number(Application_Links *app, Buffer_ID return(result); } -internal i64 +function i64 get_pos_past_lead_whitespace(Application_Links *app, Buffer_ID buffer, i64 pos){ i64 line_number = get_line_number_from_pos(app, buffer, pos); i64 result = get_pos_past_lead_whitespace_from_line_number(app, buffer, line_number); @@ -1143,20 +1143,20 @@ get_pos_past_lead_whitespace(Application_Links *app, Buffer_ID buffer, i64 pos){ return(result); } -internal void +function void move_past_lead_whitespace(Application_Links *app, View_ID view, Buffer_ID buffer){ i64 pos = view_get_cursor_pos(app, view); i64 new_pos = get_pos_past_lead_whitespace(app, buffer, pos); view_set_cursor_and_preferred_x(app, view, seek_pos(new_pos)); } -internal void +function void move_past_lead_whitespace(Application_Links *app, View_ID view){ Buffer_ID buffer = view_get_buffer(app, view, Access_ReadVisible); move_past_lead_whitespace(app, view, buffer); } -internal b32 +function b32 line_is_blank(Application_Links *app, Buffer_ID buffer, i64 line_number){ Scratch_Block scratch(app); String_Const_u8 line = push_buffer_line(app, scratch, buffer, line_number); @@ -1170,7 +1170,7 @@ line_is_blank(Application_Links *app, Buffer_ID buffer, i64 line_number){ return(is_blank); } -internal i64 +function i64 get_line_number_of__whitespace_status_line(Application_Links *app, Buffer_ID buffer, Scan_Direction direction, i64 line_number_start, b32 get_blank_line){ i64 line_count = buffer_get_line_count(app, buffer); i64 line_number = line_number_start + direction; @@ -1184,17 +1184,17 @@ get_line_number_of__whitespace_status_line(Application_Links *app, Buffer_ID buf return(line_number); } -internal i64 +function i64 get_line_number_of_non_blank_line(Application_Links *app, Buffer_ID buffer, Scan_Direction direction, i64 line_number_start){ return(get_line_number_of__whitespace_status_line(app, buffer, direction, line_number_start, false)); } -internal i64 +function i64 get_line_number_of_blank_line(Application_Links *app, Buffer_ID buffer, Scan_Direction direction, i64 line_number_start){ return(get_line_number_of__whitespace_status_line(app, buffer, direction, line_number_start, true)); } -internal i64 +function i64 get_pos_of_blank_line(Application_Links *app, Buffer_ID buffer, Scan_Direction direction, i64 pos_start){ i64 line_number_start = get_line_number_from_pos(app, buffer, pos_start); i64 blank_line = get_line_number_of_blank_line(app, buffer, direction, line_number_start); @@ -1202,7 +1202,7 @@ get_pos_of_blank_line(Application_Links *app, Buffer_ID buffer, Scan_Direction d return(pos); } -internal i64 +function i64 get_line_number_of_blank_line_grouped(Application_Links *app, Buffer_ID buffer, Scan_Direction direction, i64 line_number_start){ i64 line_number = line_number_start; if (line_is_blank(app, buffer, line_number)){ @@ -1212,7 +1212,7 @@ get_line_number_of_blank_line_grouped(Application_Links *app, Buffer_ID buffer, return(line_number); } -internal i64 +function i64 get_pos_of_blank_line_grouped(Application_Links *app, Buffer_ID buffer, Scan_Direction direction, i64 pos_start){ i64 line_number_start = get_line_number_from_pos(app, buffer, pos_start); i64 blank_line = get_line_number_of_blank_line_grouped(app, buffer, direction, line_number_start); @@ -1220,7 +1220,7 @@ get_pos_of_blank_line_grouped(Application_Links *app, Buffer_ID buffer, Scan_Dir return(pos); } -internal Indent_Info +function Indent_Info get_indent_info_range(Application_Links *app, Buffer_ID buffer, Range_i64 range, i32 tab_width){ Scratch_Block scratch(app); String_Const_u8 s = push_buffer_range(app, scratch, buffer, range); @@ -1252,7 +1252,7 @@ get_indent_info_range(Application_Links *app, Buffer_ID buffer, Range_i64 range, return(info); } -internal Indent_Info +function Indent_Info get_indent_info_line_number_and_start(Application_Links *app, Buffer_ID buffer, i64 line_number, i64 line_start, i32 tab_width){ i64 end = get_line_side_pos(app, buffer, line_number, Side_Max); return(get_indent_info_range(app, buffer, Ii64(line_start, end), tab_width)); @@ -1260,7 +1260,7 @@ get_indent_info_line_number_and_start(Application_Links *app, Buffer_ID buffer, //////////////////////////////// -internal History_Group +function History_Group history_group_begin(Application_Links *app, Buffer_ID buffer){ History_Group group = {}; group.app = app; @@ -1270,7 +1270,7 @@ history_group_begin(Application_Links *app, Buffer_ID buffer){ return(group); } -internal void +function void history_group_end(History_Group group){ History_Record_Index last = buffer_history_get_current_state_index(group.app, group.buffer); if (group.first < last){ @@ -1280,7 +1280,7 @@ history_group_end(History_Group group){ //////////////////////////////// -internal void +function void replace_in_range(Application_Links *app, Buffer_ID buffer, Range_i64 range, String_Const_u8 needle, String_Const_u8 string){ // TODO(allen): rewrite History_Group group = history_group_begin(app, buffer); @@ -1298,7 +1298,7 @@ replace_in_range(Application_Links *app, Buffer_ID buffer, Range_i64 range, Stri history_group_end(group); } -internal Range_i64 +function Range_i64 swap_lines(Application_Links *app, Buffer_ID buffer, i64 line_1, i64 line_2){ Range_i64 result = {}; i64 line_count = buffer_get_line_count(app, buffer); @@ -1323,7 +1323,7 @@ swap_lines(Application_Links *app, Buffer_ID buffer, i64 line_1, i64 line_2){ return(result); } -internal i64 +function i64 move_line(Application_Links *app, Buffer_ID buffer, i64 line_number, Scan_Direction direction){ i64 line_1 = 0; i64 line_2 = 0; @@ -1351,14 +1351,14 @@ move_line(Application_Links *app, Buffer_ID buffer, i64 line_number, Scan_Direct return(result); } -internal void +function void clear_buffer(Application_Links *app, Buffer_ID buffer){ buffer_replace_range(app, buffer, buffer_range(app, buffer), string_u8_litexpr("")); } //////////////////////////////// -internal String_Match_List +function String_Match_List find_all_matches_all_buffers(Application_Links *app, Arena *arena, String_Const_u8_Array match_patterns, String_Match_Flag must_have_flags, String_Match_Flag must_not_have_flags){ String_Match_List all_matches = {}; for (Buffer_ID buffer = get_buffer_next(app, 0, Access_Always); @@ -1384,7 +1384,7 @@ find_all_matches_all_buffers(Application_Links *app, Arena *arena, String_Const_ return(all_matches); } -internal String_Match_List +function String_Match_List find_all_matches_all_buffers(Application_Links *app, Arena *arena, String_Const_u8 pattern, String_Match_Flag must_have_flags, String_Match_Flag must_not_have_flags){ String_Const_u8_Array array = {&pattern, 1}; return(find_all_matches_all_buffers(app, arena, array, must_have_flags, must_not_have_flags)); @@ -1392,17 +1392,17 @@ find_all_matches_all_buffers(Application_Links *app, Arena *arena, String_Const_ //////////////////////////////// -internal b32 +function b32 is_modified(User_Input *input){ return(is_modified(&input->event)); } -internal String_Const_u8 +function String_Const_u8 to_writable(User_Input *in){ return(to_writable(&in->event)); } -internal b32 +function b32 has_modifier(User_Input *in, Key_Code key_code){ b32 result = false; Input_Modifier_Set *mods = get_modifiers(&in->event); @@ -1412,17 +1412,17 @@ has_modifier(User_Input *in, Key_Code key_code){ return(result); } -internal b32 +function b32 match_key_code(User_Input *in, Key_Code key_code){ return(match_key_code(&in->event, key_code)); } -internal b32 +function b32 match_core_code(User_Input *in, Key_Code core_code){ return(match_core_code(&in->event, core_code)); } -internal String_Const_u8 +function String_Const_u8 backspace_utf8(String_Const_u8 string){ if (string.size > 0){ u64 i = string.size - 1; @@ -1476,7 +1476,7 @@ Query_Bar_Group::~Query_Bar_Group(){ clear_all_query_bars(this->app, this->view); } -internal b32 +function b32 query_user_general(Application_Links *app, Query_Bar *bar, b32 force_number, String_Const_u8 init_string){ if (start_query_bar(app, bar, 0) == 0){ return(false); @@ -1556,17 +1556,17 @@ query_user_general(Application_Links *app, Query_Bar *bar, b32 force_number, Str return(success); } -internal b32 +function b32 query_user_string(Application_Links *app, Query_Bar *bar){ return(query_user_general(app, bar, false, string_u8_empty)); } -internal b32 +function b32 query_user_number(Application_Links *app, Query_Bar *bar){ return(query_user_general(app, bar, true, string_u8_empty)); } -internal b32 +function b32 query_user_number(Application_Links *app, Query_Bar *bar, i32 x){ Scratch_Block scratch(app); String_Const_u8 string = push_u8_stringf(scratch, "%d", x); @@ -1575,7 +1575,7 @@ query_user_number(Application_Links *app, Query_Bar *bar, i32 x){ //////////////////////////////// -internal Buffer_Identifier +function Buffer_Identifier buffer_identifier(char *str, i32 len){ Buffer_Identifier identifier; identifier.name = str; @@ -1584,12 +1584,12 @@ buffer_identifier(char *str, i32 len){ return(identifier); } -internal Buffer_Identifier +function Buffer_Identifier buffer_identifier(String_Const_u8 str){ return(buffer_identifier((char*)str.str, (i32)str.size)); } -internal Buffer_Identifier +function Buffer_Identifier buffer_identifier(Buffer_ID id){ Buffer_Identifier identifier; identifier.name = 0; @@ -1598,7 +1598,7 @@ buffer_identifier(Buffer_ID id){ return(identifier); } -internal Buffer_ID +function Buffer_ID buffer_identifier_to_id(Application_Links *app, Buffer_Identifier identifier){ Buffer_ID id = 0; if (identifier.id != 0){ @@ -1614,7 +1614,7 @@ buffer_identifier_to_id(Application_Links *app, Buffer_Identifier identifier){ return(id); } -internal Buffer_ID +function Buffer_ID buffer_identifier_to_id_create_out_buffer(Application_Links *app, Buffer_Identifier buffer_id){ Buffer_ID result = 0; if (buffer_id.name != 0 && buffer_id.name_len > 0){ @@ -1715,7 +1715,7 @@ get_view_line_height(Application_Links *app, View_ID view){ return(metrics.line_height); } -internal View_ID +function View_ID open_view(Application_Links *app, View_ID view_location, View_Split_Position position){ View_ID result = 0; if (view_location != 0 && view_exists(app, view_location)){ @@ -1740,7 +1740,7 @@ open_view(Application_Links *app, View_ID view_location, View_Split_Position pos return(result); } -internal View_ID +function View_ID get_first_view_with_buffer(Application_Links *app, Buffer_ID buffer_id){ View_ID result = {}; if (buffer_id != 0){ @@ -1757,7 +1757,7 @@ get_first_view_with_buffer(Application_Links *app, Buffer_ID buffer_id){ return(result); } -internal b32 +function b32 open_file(Application_Links *app, Buffer_ID *buffer_out, String_Const_u8 file_name, b32 background, b32 never_new){ b32 result = false; Buffer_ID buffer = get_buffer_by_name(app, file_name, Access_ReadVisible); @@ -1782,7 +1782,7 @@ open_file(Application_Links *app, Buffer_ID *buffer_out, String_Const_u8 file_na return(result); } -internal b32 +function b32 view_open_file(Application_Links *app, View_ID view, String_Const_u8 file_name, b32 never_new){ b32 result = false; if (view != 0){ @@ -1795,7 +1795,7 @@ view_open_file(Application_Links *app, View_ID view, String_Const_u8 file_name, return(result); } -internal void +function void view_disable_highlight_range(Application_Links *app, View_ID view){ Managed_Scope scope = view_get_managed_scope(app, view); Managed_Object *highlight = scope_attachment(app, scope, view_highlight_range, Managed_Object); @@ -1806,7 +1806,7 @@ view_disable_highlight_range(Application_Links *app, View_ID view){ managed_scope_attachment_erase(app, scope, view_highlight_buffer); } -internal void +function void view_set_highlight_range(Application_Links *app, View_ID view, Range_i64 range){ view_disable_highlight_range(app, view); @@ -1894,7 +1894,7 @@ get_buffer_next_looped(Application_Links *app, Buffer_ID buffer, Access_Flag acc //////////////////////////////// -internal View_ID +function View_ID get_next_view_looped_all_panels(Application_Links *app, View_ID view_id, Access_Flag access){ view_id = get_view_next(app, view_id, access); if (view_id == 0){ @@ -1903,7 +1903,7 @@ get_next_view_looped_all_panels(Application_Links *app, View_ID view_id, Access_ return(view_id); } -internal View_ID +function View_ID get_prev_view_looped_all_panels(Application_Links *app, View_ID view_id, Access_Flag access){ view_id = get_view_prev(app, view_id, access); if (view_id == 0){ @@ -1914,7 +1914,7 @@ get_prev_view_looped_all_panels(Application_Links *app, View_ID view_id, Access_ //////////////////////////////// -internal Buffer_Kill_Result +function Buffer_Kill_Result try_buffer_kill(Application_Links *app, Buffer_ID buffer, View_ID gui_view_id, Buffer_Kill_Flag flags){ Buffer_Kill_Result result = buffer_kill(app, buffer, flags); if (result == BufferKillResult_Dirty){ @@ -1927,7 +1927,7 @@ try_buffer_kill(Application_Links *app, Buffer_ID buffer, View_ID gui_view_id, B //////////////////////////////// -internal String_Const_u8 +function String_Const_u8 get_query_string(Application_Links *app, char *query_str, u8 *string_space, i32 space_size){ Query_Bar_Group group(app); Query_Bar bar = {}; @@ -1940,7 +1940,7 @@ get_query_string(Application_Links *app, char *query_str, u8 *string_space, i32 return(bar.string); } -internal Token* +function Token* get_token_from_pos(Application_Links *app, Token_Array *array, u64 pos){ Token *result = 0; if (array->count > 0){ @@ -1950,13 +1950,13 @@ get_token_from_pos(Application_Links *app, Token_Array *array, u64 pos){ return(result); } -internal Token* +function Token* get_token_from_pos(Application_Links *app, Buffer_ID buffer, u64 pos){ Token_Array array = get_token_array_from_buffer(app, buffer); return(get_token_from_pos(app, &array, pos)); } -internal String_Const_u8 +function String_Const_u8 push_token_or_word_under_pos(Application_Links *app, Arena *arena, Buffer_ID buffer, u64 pos){ String_Const_u8 result = {}; Token *token = get_token_from_pos(app, buffer, pos); @@ -1967,7 +1967,7 @@ push_token_or_word_under_pos(Application_Links *app, Arena *arena, Buffer_ID buf return(result); } -internal String_Const_u8 +function String_Const_u8 push_token_or_word_under_active_cursor(Application_Links *app, Arena *arena){ View_ID view = get_active_view(app, Access_Always); Buffer_ID buffer = view_get_buffer(app, view, Access_Always); @@ -1977,28 +1977,28 @@ push_token_or_word_under_active_cursor(Application_Links *app, Arena *arena){ //////////////////////////////// -internal b32 +function b32 file_exists(Application_Links *app, String_Const_u8 file_name){ Scratch_Block scratch(app); File_Attributes attributes = system_quick_file_attributes(scratch, file_name); return(attributes.last_write_time > 0); } -internal b32 +function b32 file_exists_and_is_file(Application_Links *app, String_Const_u8 file_name){ Scratch_Block scratch(app); File_Attributes attributes = system_quick_file_attributes(scratch, file_name); return(attributes.last_write_time > 0 && !HasFlag(attributes.flags, FileAttribute_IsDirectory)); } -internal b32 +function b32 file_exists_and_is_folder(Application_Links *app, String_Const_u8 file_name){ Scratch_Block scratch(app); File_Attributes attributes = system_quick_file_attributes(scratch, file_name); return(attributes.last_write_time > 0 && HasFlag(attributes.flags, FileAttribute_IsDirectory)); } -internal Data +function Data dump_file_handle(Arena *arena, FILE *file){ Data result = {}; if (file != 0){ @@ -2014,7 +2014,7 @@ dump_file_handle(Arena *arena, FILE *file){ return(result); } -internal String_Const_u8 +function String_Const_u8 push_file_search_up_path(Application_Links *app, Arena *arena, String_Const_u8 start_path, String_Const_u8 file_name){ String_Const_u8 result = {}; String_Const_u8 path = start_path; @@ -2036,7 +2036,7 @@ push_file_search_up_path(Application_Links *app, Arena *arena, String_Const_u8 s return(result); } -internal FILE* +function FILE* open_file_try_current_path_then_binary_path(Application_Links *app, char *file_name){ FILE *file = fopen(file_name, "rb"); if (file == 0){ @@ -2050,7 +2050,7 @@ open_file_try_current_path_then_binary_path(Application_Links *app, char *file_n return(file); } -internal FILE* +function FILE* open_file(Arena *scratch, String_Const_u8 name){ Temp_Memory temp = begin_temp(scratch); String_Const_u8 name_copy = push_string_copy(scratch, name); @@ -2059,7 +2059,7 @@ open_file(Arena *scratch, String_Const_u8 name){ return(file); } -internal File_Name_Data +function File_Name_Data dump_file(Arena *arena, String_Const_u8 file_name){ File_Name_Data result = {}; FILE *file = open_file(arena, file_name); @@ -2071,7 +2071,7 @@ dump_file(Arena *arena, String_Const_u8 file_name){ return(result); } -internal File_Name_Data +function File_Name_Data dump_file_search_up_path(Application_Links *app, Arena *arena, String_Const_u8 path, String_Const_u8 file_name){ File_Name_Data result = {}; String_Const_u8 full_path = push_file_search_up_path(app, arena, path, file_name); @@ -2081,7 +2081,7 @@ dump_file_search_up_path(Application_Links *app, Arena *arena, String_Const_u8 p return(result); } -internal void +function void sort_pairs_by_key__quick(Sort_Pair_i32 *pairs, i32 first, i32 one_past_last){ i32 dif = one_past_last - first; if (dif >= 2){ @@ -2112,12 +2112,12 @@ sort_pairs_by_key__quick(Sort_Pair_i32 *pairs, i32 first, i32 one_past_last){ } } -internal void +function void sort_pairs_by_key(Sort_Pair_i32 *pairs, i32 count){ sort_pairs_by_key__quick(pairs, 0, count); } -internal Range_i32_Array +function Range_i32_Array get_ranges_of_duplicate_keys(Arena *arena, i32 *keys, i32 stride, i32 count){ Range_i32_Array result = {}; result.ranges = push_array(arena, Range_i32, count); @@ -2142,19 +2142,19 @@ get_ranges_of_duplicate_keys(Arena *arena, i32 *keys, i32 stride, i32 count){ return(result); } -internal void +function void no_mark_snap_to_cursor(Application_Links *app, Managed_Scope view_scope){ b32 *snap_to_cursor = scope_attachment(app, view_scope, view_snap_mark_to_cursor, b32); *snap_to_cursor = false; } -internal void +function void no_mark_snap_to_cursor(Application_Links *app, View_ID view_id){ Managed_Scope scope = view_get_managed_scope(app, view_id); no_mark_snap_to_cursor(app, scope); } -internal void +function void no_mark_snap_to_cursor_if_shift(Application_Links *app, View_ID view_id){ Scratch_Block scratch(app); Input_Modifier_Set mods = system_get_keyboard_modifiers(scratch); @@ -2163,7 +2163,7 @@ no_mark_snap_to_cursor_if_shift(Application_Links *app, View_ID view_id){ } } -internal b32 +function b32 view_has_highlighted_range(Application_Links *app, View_ID view){ b32 result = false; if (fcoder_mode == FCoderMode_NotepadLike){ @@ -2174,7 +2174,7 @@ view_has_highlighted_range(Application_Links *app, View_ID view){ return(result); } -internal b32 +function b32 if_view_has_highlighted_range_delete_range(Application_Links *app, View_ID view_id){ b32 result = false; if (view_has_highlighted_range(app, view_id)){ @@ -2186,7 +2186,7 @@ if_view_has_highlighted_range_delete_range(Application_Links *app, View_ID view_ return(result); } -internal void +function void begin_notepad_mode(Application_Links *app){ fcoder_mode = FCoderMode_NotepadLike; for (View_ID view = get_view_next(app, 0, Access_Always); @@ -2199,7 +2199,7 @@ begin_notepad_mode(Application_Links *app){ //////////////////////////////// -internal void +function void seek_pos_of_textual_line(Application_Links *app, Side side){ View_ID view = get_active_view(app, Access_ReadVisible); Buffer_ID buffer = view_get_buffer(app, view, Access_ReadVisible); @@ -2209,7 +2209,7 @@ seek_pos_of_textual_line(Application_Links *app, Side side){ no_mark_snap_to_cursor_if_shift(app, view); } -internal void +function void seek_pos_of_visual_line(Application_Links *app, Side side){ View_ID view = get_active_view(app, Access_ReadVisible); i64 pos = view_get_cursor_pos(app, view); @@ -2265,7 +2265,7 @@ CUSTOM_DOC("Sets the cursor to the end of the file.") //////////////////////////////// -internal b32 +function b32 view_set_split(Application_Links *app, View_ID view, View_Split_Kind kind, f32 t){ b32 result = false; if (view != 0){ @@ -2287,19 +2287,19 @@ view_set_split(Application_Links *app, View_ID view, View_Split_Kind kind, f32 t return(result); } -internal b32 +function b32 view_set_split_proportion(Application_Links *app, View_ID view, f32 t){ return(view_set_split(app, view, ViewSplitKind_Ratio, t)); } -internal b32 +function b32 view_set_split_pixel_size(Application_Links *app, View_ID view, i32 t){ return(view_set_split(app, view, ViewSplitKind_FixedPixels, (f32)t)); } //////////////////////////////// -internal Record_Info +function Record_Info get_single_record(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index){ Record_Info record = buffer_history_get_record_info(app, buffer_id, index); if (record.error == RecordError_NoError && record.kind == RecordKind_Group){ @@ -2446,7 +2446,7 @@ guess_line_ending_kind_from_buffer(Application_Links *app, Buffer_ID buffer){ // TODO(allen): REWRITE THIS EXACTLY HOW YOU WANT IT --- start --- -internal Child_Process_Set_Target_Flags +function Child_Process_Set_Target_Flags flags_system_command(Command_Line_Interface_Flag flags){ Child_Process_Set_Target_Flags set_buffer_flags = 0; if (!HasFlag(flags, CLI_OverlapWithConflict)){ @@ -2458,7 +2458,7 @@ flags_system_command(Command_Line_Interface_Flag flags){ return(set_buffer_flags); } -internal b32 +function b32 set_buffer_system_command(Application_Links *app, Child_Process_ID process, Buffer_ID buffer, Command_Line_Interface_Flag flags){ b32 result = false; Child_Process_Set_Target_Flags set_buffer_flags = flags_system_command(flags); @@ -2477,7 +2477,7 @@ set_buffer_system_command(Application_Links *app, Child_Process_ID process, Buff return(result); } -internal b32 +function b32 exec_system_command(Application_Links *app, View_ID view, Buffer_Identifier buffer_id, String_Const_u8 path, String_Const_u8 command, Command_Line_Interface_Flag flags){ b32 result = false; diff --git a/custom/4coder_search.cpp b/custom/4coder_search.cpp index c2335b81..758db2d1 100644 --- a/custom/4coder_search.cpp +++ b/custom/4coder_search.cpp @@ -137,14 +137,17 @@ list_all_locations__generic(Application_Links *app, String_Const_u8_Array needle internal void list_all_locations__generic(Application_Links *app, String_Const_u8 needle, List_All_Locations_Flag flags){ - String_Const_u8_Array array = {&needle, 1}; - list_all_locations__generic(app, array, flags); + if (needle.size != 0){ + String_Const_u8_Array array = {&needle, 1}; + list_all_locations__generic(app, array, flags); + } } internal void list_all_locations__generic_query(Application_Links *app, List_All_Locations_Flag flags){ Scratch_Block scratch(app); - String_Const_u8 needle = query_user_list_needle(app, scratch); + u8 *space = push_array(scratch, u8, KB(1)); + String_Const_u8 needle = get_query_string(app, "List Locations For: ", space, KB(1)); list_all_locations__generic(app, needle, flags); } diff --git a/custom/generated/command_metadata.h b/custom/generated/command_metadata.h index 3dc3ac8d..841f8c9b 100644 --- a/custom/generated/command_metadata.h +++ b/custom/generated/command_metadata.h @@ -270,254 +270,254 @@ i32 source_name_len; i32 line_number; }; static Command_Metadata fcoder_metacmd_table[248] = { -{ PROC_LINKS(allow_mouse, 0), false, "allow_mouse", 11, "Shows the mouse and causes all mouse input to be processed normally.", 68, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 485 }, -{ PROC_LINKS(auto_indent_line_at_cursor, 0), false, "auto_indent_line_at_cursor", 26, "Auto-indents the line on which the cursor sits.", 47, "W:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 417 }, -{ PROC_LINKS(auto_indent_range, 0), false, "auto_indent_range", 17, "Auto-indents the range between the cursor and the mark.", 55, "W:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 427 }, -{ PROC_LINKS(auto_indent_whole_file, 0), false, "auto_indent_whole_file", 22, "Audo-indents the entire current buffer.", 39, "W:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 408 }, -{ PROC_LINKS(backspace_alpha_numeric_boundary, 0), false, "backspace_alpha_numeric_boundary", 32, "Delete characters between the cursor position and the first alphanumeric boundary to the left.", 94, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 154 }, -{ PROC_LINKS(backspace_char, 0), false, "backspace_char", 14, "Deletes the character to the left of the cursor.", 48, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 96 }, -{ PROC_LINKS(basic_change_active_panel, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 666 }, -{ PROC_LINKS(begin_clipboard_collection_mode, 0), true, "begin_clipboard_collection_mode", 31, "Allows the user to copy multiple strings from other applications before switching to 4coder and pasting them all.", 113, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 71 }, -{ PROC_LINKS(build_in_build_panel, 0), false, "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\\custom\\4coder_build_commands.cpp", 44, 159 }, -{ PROC_LINKS(build_search, 0), false, "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\\custom\\4coder_build_commands.cpp", 44, 122 }, -{ PROC_LINKS(center_view, 0), false, "center_view", 11, "Centers the view vertically on the line on which the cursor sits.", 65, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 195 }, -{ PROC_LINKS(change_active_panel, 0), false, "change_active_panel", 19, "Change the currently active panel, moving to the panel with the next highest view_id.", 85, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 360 }, -{ PROC_LINKS(change_active_panel_backwards, 0), false, "change_active_panel_backwards", 29, "Change the currently active panel, moving to the panel with the next lowest view_id.", 84, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 366 }, -{ PROC_LINKS(change_to_build_panel, 0), false, "change_to_build_panel", 21, "If the special build panel is open, makes the build panel the active panel.", 75, "W:\\4ed\\code\\custom\\4coder_build_commands.cpp", 44, 180 }, -{ PROC_LINKS(clean_all_lines, 0), false, "clean_all_lines", 15, "Removes trailing whitespace from all lines and removes all blank lines in the current buffer.", 93, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 646 }, -{ PROC_LINKS(clean_trailing_whitespace, 0), false, "clean_trailing_whitespace", 25, "Removes trailing whitespace from all lines in the current buffer.", 65, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 655 }, -{ PROC_LINKS(clear_all_themes, 0), false, "clear_all_themes", 16, "Clear the theme list", 20, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 556 }, -{ PROC_LINKS(clear_clipboard, 0), false, "clear_clipboard", 15, "Clears the history of the clipboard", 35, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 221 }, -{ PROC_LINKS(click_set_cursor, 0), false, "click_set_cursor", 16, "Sets the cursor position to the mouse position.", 47, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 233 }, -{ PROC_LINKS(click_set_cursor_and_mark, 0), false, "click_set_cursor_and_mark", 25, "Sets the cursor position and mark to the mouse position.", 56, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 223 }, -{ PROC_LINKS(click_set_cursor_if_lbutton, 0), false, "click_set_cursor_if_lbutton", 27, "If the mouse left button is pressed, sets the cursor position to the mouse position.", 84, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 243 }, -{ PROC_LINKS(click_set_mark, 0), false, "click_set_mark", 14, "Sets the mark position to the mouse position.", 45, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 256 }, -{ PROC_LINKS(clipboard_record_clip, 0), false, "clipboard_record_clip", 21, "In response to a new clipboard contents events, saves the new clip onto the clipboard history", 93, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 7 }, -{ PROC_LINKS(close_all_code, 0), false, "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\\custom\\4coder_project_commands.cpp", 46, 844 }, -{ PROC_LINKS(close_build_panel, 0), false, "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "W:\\4ed\\code\\custom\\4coder_build_commands.cpp", 44, 174 }, -{ PROC_LINKS(close_panel, 0), false, "close_panel", 11, "Closes the currently active panel if it is not the only panel open.", 67, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 674 }, -{ PROC_LINKS(command_documentation, 0), true, "command_documentation", 21, "Prompts the user to select a command then loads a doc buffer for that item", 74, "W:\\4ed\\code\\custom\\4coder_docs.cpp", 34, 190 }, -{ PROC_LINKS(command_lister, 0), true, "command_lister", 14, "Opens an interactive list of all registered commands.", 53, "W:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 760 }, -{ PROC_LINKS(comment_line, 0), false, "comment_line", 12, "Insert '//' at the beginning of the line after leading whitespace.", 66, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 125 }, -{ PROC_LINKS(comment_line_toggle, 0), false, "comment_line_toggle", 19, "Turns uncommented lines into commented lines and vice versa for comments starting with '//'.", 92, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 149 }, -{ PROC_LINKS(copy, 0), false, "copy", 4, "Copy the text in the range from the cursor to the mark onto the clipboard.", 74, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 110 }, -{ PROC_LINKS(cursor_mark_swap, 0), false, "cursor_mark_swap", 16, "Swaps the position of the cursor and the mark.", 46, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 124 }, -{ PROC_LINKS(custom_api_documentation, 0), true, "custom_api_documentation", 24, "Prompts the user to select a Custom API item then loads a doc buffer for that item", 82, "W:\\4ed\\code\\custom\\4coder_docs.cpp", 34, 175 }, -{ PROC_LINKS(cut, 0), false, "cut", 3, "Cut the text in the range from the cursor to the mark onto the clipboard.", 73, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 119 }, -{ PROC_LINKS(decrease_face_size, 0), false, "decrease_face_size", 18, "Decrease the size of the face used by the current buffer.", 57, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 757 }, -{ PROC_LINKS(default_file_externally_modified, 0), false, "default_file_externally_modified", 32, "Notes the external modification of attached files by printing a message.", 72, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 2055 }, -{ PROC_LINKS(default_startup, 0), false, "default_startup", 15, "Default command for responding to a startup event", 49, "W:\\4ed\\code\\custom\\4coder_default_hooks.cpp", 43, 7 }, -{ PROC_LINKS(default_try_exit, 0), false, "default_try_exit", 16, "Default command for responding to a try-exit event", 50, "W:\\4ed\\code\\custom\\4coder_default_hooks.cpp", 43, 23 }, -{ PROC_LINKS(default_view_input_handler, 0), false, "default_view_input_handler", 26, "Input consumption loop for default view behavior", 48, "W:\\4ed\\code\\custom\\4coder_default_hooks.cpp", 43, 51 }, -{ PROC_LINKS(delete_alpha_numeric_boundary, 0), false, "delete_alpha_numeric_boundary", 29, "Delete characters between the cursor position and the first alphanumeric boundary to the right.", 95, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 161 }, -{ PROC_LINKS(delete_char, 0), false, "delete_char", 11, "Deletes the character to the right of the cursor.", 49, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 79 }, -{ PROC_LINKS(delete_current_scope, 0), false, "delete_current_scope", 20, "Deletes the braces surrounding the currently selected scope. Leaves the contents within the scope.", 99, "W:\\4ed\\code\\custom\\4coder_scope_commands.cpp", 44, 112 }, -{ PROC_LINKS(delete_file_query, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1381 }, -{ PROC_LINKS(delete_line, 0), false, "delete_line", 11, "Delete the line the on which the cursor sits.", 45, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1553 }, -{ PROC_LINKS(delete_range, 0), false, "delete_range", 12, "Deletes the text in the range between the cursor and the mark.", 62, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 134 }, -{ PROC_LINKS(display_key_codes, 0), false, "display_key_codes", 17, "Example of input handling loop", 30, "W:\\4ed\\code\\custom\\4coder_examples.cpp", 38, 90 }, -{ PROC_LINKS(display_text_input, 0), false, "display_text_input", 18, "Example of to_writable and leave_current_input_unhandled", 56, "W:\\4ed\\code\\custom\\4coder_examples.cpp", 38, 137 }, -{ PROC_LINKS(double_backspace, 0), false, "double_backspace", 16, "Example of history group helpers", 32, "W:\\4ed\\code\\custom\\4coder_examples.cpp", 38, 10 }, -{ PROC_LINKS(duplicate_line, 0), false, "duplicate_line", 14, "Create a copy of the line on which the cursor sits.", 51, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1539 }, -{ PROC_LINKS(execute_any_cli, 0), false, "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\\custom\\4coder_cli_command.cpp", 41, 22 }, -{ PROC_LINKS(execute_previous_cli, 0), false, "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\\custom\\4coder_cli_command.cpp", 41, 7 }, -{ PROC_LINKS(exit_4coder, 0), false, "exit_4coder", 11, "Attempts to close 4coder.", 25, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 844 }, -{ PROC_LINKS(goto_beginning_of_file, 0), false, "goto_beginning_of_file", 22, "Sets the cursor to the beginning of the file.", 45, "W:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2248 }, -{ PROC_LINKS(goto_end_of_file, 0), false, "goto_end_of_file", 16, "Sets the cursor to the end of the file.", 39, "W:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2256 }, -{ PROC_LINKS(goto_first_jump, 0), false, "goto_first_jump", 15, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "W:\\4ed\\code\\custom\\4coder_jump_sticky.cpp", 41, 525 }, -{ PROC_LINKS(goto_first_jump_same_panel_sticky, 0), false, "goto_first_jump_same_panel_sticky", 33, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer and views the buffer in the panel where the jump list was.", 153, "W:\\4ed\\code\\custom\\4coder_jump_sticky.cpp", 41, 542 }, -{ PROC_LINKS(goto_jump_at_cursor, 0), false, "goto_jump_at_cursor", 19, "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\\custom\\4coder_jump_sticky.cpp", 41, 348 }, -{ PROC_LINKS(goto_jump_at_cursor_same_panel, 0), false, "goto_jump_at_cursor_same_panel", 30, "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\\custom\\4coder_jump_sticky.cpp", 41, 375 }, -{ PROC_LINKS(goto_line, 0), false, "goto_line", 9, "Queries the user for a number, and jumps the cursor to the corresponding line.", 78, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 852 }, -{ PROC_LINKS(goto_next_jump, 0), false, "goto_next_jump", 14, "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\\custom\\4coder_jump_sticky.cpp", 41, 464 }, -{ PROC_LINKS(goto_next_jump_no_skips, 0), false, "goto_next_jump_no_skips", 23, "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\\custom\\4coder_jump_sticky.cpp", 41, 494 }, -{ PROC_LINKS(goto_prev_jump, 0), false, "goto_prev_jump", 14, "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\\custom\\4coder_jump_sticky.cpp", 41, 481 }, -{ PROC_LINKS(goto_prev_jump_no_skips, 0), false, "goto_prev_jump_no_skips", 23, "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\\custom\\4coder_jump_sticky.cpp", 41, 511 }, -{ PROC_LINKS(hide_filebar, 0), false, "hide_filebar", 12, "Sets the current view to hide it's filebar.", 43, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 704 }, -{ PROC_LINKS(hide_scrollbar, 0), false, "hide_scrollbar", 14, "Sets the current view to hide it's scrollbar.", 45, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 690 }, -{ PROC_LINKS(hms_demo_tutorial, 0), false, "hms_demo_tutorial", 17, "Tutorial for built in 4coder bindings and features.", 51, "W:\\4ed\\code\\custom\\4coder_tutorial.cpp", 38, 869 }, -{ PROC_LINKS(if0_off, 0), false, "if0_off", 7, "Surround the range between the cursor and mark with an '#if 0' and an '#endif'", 78, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 70 }, -{ PROC_LINKS(if_read_only_goto_position, 0), false, "if_read_only_goto_position", 26, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "W:\\4ed\\code\\custom\\4coder_jump_sticky.cpp", 41, 564 }, -{ PROC_LINKS(if_read_only_goto_position_same_panel, 0), false, "if_read_only_goto_position_same_panel", 37, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "W:\\4ed\\code\\custom\\4coder_jump_sticky.cpp", 41, 581 }, -{ PROC_LINKS(increase_face_size, 0), false, "increase_face_size", 18, "Increase the size of the face used by the current buffer.", 57, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 746 }, -{ PROC_LINKS(interactive_kill_buffer, 0), true, "interactive_kill_buffer", 23, "Interactively kill an open buffer.", 34, "W:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 520 }, -{ PROC_LINKS(interactive_new, 0), true, "interactive_new", 15, "Interactively creates a new file.", 33, "W:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 660 }, -{ PROC_LINKS(interactive_open, 0), true, "interactive_open", 16, "Interactively opens a file.", 27, "W:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 714 }, -{ PROC_LINKS(interactive_open_or_new, 0), true, "interactive_open_or_new", 23, "Interactively open a file out of the file system.", 49, "W:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 611 }, -{ PROC_LINKS(interactive_switch_buffer, 0), true, "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "W:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 510 }, -{ PROC_LINKS(jump_to_definition, 0), true, "jump_to_definition", 18, "List all definitions in the code index and jump to one chosen by the user.", 74, "W:\\4ed\\code\\custom\\4coder_code_index_listers.cpp", 48, 12 }, -{ PROC_LINKS(jump_to_definition_at_cursor, 0), true, "jump_to_definition_at_cursor", 28, "Jump to the first definition in the code index matching an identifier at the cursor", 83, "W:\\4ed\\code\\custom\\4coder_code_index_listers.cpp", 48, 68 }, -{ PROC_LINKS(jump_to_last_point, 0), false, "jump_to_last_point", 18, "Read from the top of the point stack and jump there; if already there pop the top and go to the next option", 107, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1334 }, -{ PROC_LINKS(keyboard_macro_finish_recording, 0), false, "keyboard_macro_finish_recording", 31, "Stop macro recording, do nothing if macro recording is not already started", 74, "W:\\4ed\\code\\custom\\4coder_keyboard_macro.cpp", 44, 54 }, -{ PROC_LINKS(keyboard_macro_replay, 0), false, "keyboard_macro_replay", 21, "Replay the most recently recorded keyboard macro", 48, "W:\\4ed\\code\\custom\\4coder_keyboard_macro.cpp", 44, 77 }, -{ PROC_LINKS(keyboard_macro_start_recording, 0), false, "keyboard_macro_start_recording", 30, "Start macro recording, do nothing if macro recording is already started", 71, "W:\\4ed\\code\\custom\\4coder_keyboard_macro.cpp", 44, 41 }, -{ PROC_LINKS(kill_buffer, 0), false, "kill_buffer", 11, "Kills the current buffer.", 25, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1717 }, -{ PROC_LINKS(kill_tutorial, 0), false, "kill_tutorial", 13, "If there is an active tutorial, kill it.", 40, "W:\\4ed\\code\\custom\\4coder_tutorial.cpp", 38, 9 }, -{ PROC_LINKS(left_adjust_view, 0), false, "left_adjust_view", 16, "Sets the left size of the view near the x position of the cursor.", 65, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 210 }, -{ PROC_LINKS(list_all_functions_all_buffers, 0), false, "list_all_functions_all_buffers", 30, "Creates a jump list of lines from all buffers that appear to define or declare functions.", 89, "W:\\4ed\\code\\custom\\4coder_function_list.cpp", 43, 296 }, -{ PROC_LINKS(list_all_functions_all_buffers_lister, 0), true, "list_all_functions_all_buffers_lister", 37, "Creates a lister of locations that look like function definitions and declarations all buffers.", 95, "W:\\4ed\\code\\custom\\4coder_function_list.cpp", 43, 302 }, -{ PROC_LINKS(list_all_functions_current_buffer, 0), false, "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\\custom\\4coder_function_list.cpp", 43, 268 }, -{ PROC_LINKS(list_all_functions_current_buffer_lister, 0), true, "list_all_functions_current_buffer_lister", 40, "Creates a lister of locations that look like function definitions and declarations in the buffer.", 97, "W:\\4ed\\code\\custom\\4coder_function_list.cpp", 43, 278 }, -{ PROC_LINKS(list_all_locations, 0), false, "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\\custom\\4coder_search.cpp", 36, 165 }, -{ PROC_LINKS(list_all_locations_case_insensitive, 0), false, "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\\custom\\4coder_search.cpp", 36, 177 }, -{ PROC_LINKS(list_all_locations_of_identifier, 0), false, "list_all_locations_of_identifier", 32, "Reads a token or word under the cursor and lists all exact case-sensitive mathces in all open buffers.", 102, "W:\\4ed\\code\\custom\\4coder_search.cpp", 36, 189 }, -{ PROC_LINKS(list_all_locations_of_identifier_case_insensitive, 0), false, "list_all_locations_of_identifier_case_insensitive", 49, "Reads a token or word under the cursor and lists all exact case-insensitive mathces in all open buffers.", 104, "W:\\4ed\\code\\custom\\4coder_search.cpp", 36, 195 }, -{ PROC_LINKS(list_all_locations_of_selection, 0), false, "list_all_locations_of_selection", 31, "Reads the string in the selected range and lists all exact case-sensitive mathces in all open buffers.", 102, "W:\\4ed\\code\\custom\\4coder_search.cpp", 36, 201 }, -{ PROC_LINKS(list_all_locations_of_selection_case_insensitive, 0), false, "list_all_locations_of_selection_case_insensitive", 48, "Reads the string in the selected range and lists all exact case-insensitive mathces in all open buffers.", 104, "W:\\4ed\\code\\custom\\4coder_search.cpp", 36, 207 }, -{ PROC_LINKS(list_all_locations_of_type_definition, 0), false, "list_all_locations_of_type_definition", 37, "Queries user for string, lists all locations of strings that appear to define a type whose name matches the input string.", 121, "W:\\4ed\\code\\custom\\4coder_search.cpp", 36, 213 }, -{ PROC_LINKS(list_all_locations_of_type_definition_of_identifier, 0), false, "list_all_locations_of_type_definition_of_identifier", 51, "Reads a token or word under the cursor and lists all locations of strings that appear to define a type whose name matches it.", 125, "W:\\4ed\\code\\custom\\4coder_search.cpp", 36, 221 }, -{ PROC_LINKS(list_all_substring_locations, 0), false, "list_all_substring_locations", 28, "Queries the user for a string and lists all case-sensitive substring matches found in all open buffers.", 103, "W:\\4ed\\code\\custom\\4coder_search.cpp", 36, 171 }, -{ PROC_LINKS(list_all_substring_locations_case_insensitive, 0), false, "list_all_substring_locations_case_insensitive", 45, "Queries the user for a string and lists all case-insensitive substring matches found in all open buffers.", 105, "W:\\4ed\\code\\custom\\4coder_search.cpp", 36, 183 }, -{ PROC_LINKS(load_project, 0), false, "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\\custom\\4coder_project_commands.cpp", 46, 864 }, -{ PROC_LINKS(load_theme_current_buffer, 0), false, "load_theme_current_buffer", 25, "Parse the current buffer as a theme file and add the theme to the theme list. If the buffer has a .4coder postfix in it's name, it is removed when the name is saved.", 165, "W:\\4ed\\code\\custom\\4coder_config.cpp", 36, 1667 }, -{ PROC_LINKS(load_themes_default_folder, 0), false, "load_themes_default_folder", 26, "Loads all the theme files in the default theme folder.", 54, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 533 }, -{ PROC_LINKS(load_themes_hot_directory, 0), false, "load_themes_hot_directory", 25, "Loads all the theme files in the current hot directory.", 55, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 545 }, -{ PROC_LINKS(make_directory_query, 0), false, "make_directory_query", 20, "Queries the user for a name and creates a new directory with the given name.", 76, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1493 }, -{ PROC_LINKS(miblo_decrement_basic, 0), false, "miblo_decrement_basic", 21, "Decrement an integer under the cursor by one.", 45, "W:\\4ed\\code\\custom\\4coder_miblo_numbers.cpp", 43, 44 }, -{ PROC_LINKS(miblo_decrement_time_stamp, 0), false, "miblo_decrement_time_stamp", 26, "Decrement a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "W:\\4ed\\code\\custom\\4coder_miblo_numbers.cpp", 43, 237 }, -{ PROC_LINKS(miblo_decrement_time_stamp_minute, 0), false, "miblo_decrement_time_stamp_minute", 33, "Decrement a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "W:\\4ed\\code\\custom\\4coder_miblo_numbers.cpp", 43, 249 }, -{ PROC_LINKS(miblo_increment_basic, 0), false, "miblo_increment_basic", 21, "Increment an integer under the cursor by one.", 45, "W:\\4ed\\code\\custom\\4coder_miblo_numbers.cpp", 43, 29 }, -{ PROC_LINKS(miblo_increment_time_stamp, 0), false, "miblo_increment_time_stamp", 26, "Increment a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "W:\\4ed\\code\\custom\\4coder_miblo_numbers.cpp", 43, 231 }, -{ PROC_LINKS(miblo_increment_time_stamp_minute, 0), false, "miblo_increment_time_stamp_minute", 33, "Increment a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "W:\\4ed\\code\\custom\\4coder_miblo_numbers.cpp", 43, 243 }, -{ PROC_LINKS(mouse_wheel_change_face_size, 0), false, "mouse_wheel_change_face_size", 28, "Reads the state of the mouse wheel and uses it to either increase or decrease the face size.", 92, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 799 }, -{ PROC_LINKS(mouse_wheel_scroll, 0), false, "mouse_wheel_scroll", 18, "Reads the scroll wheel value from the mouse state and scrolls accordingly.", 74, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 266 }, -{ PROC_LINKS(move_down, 0), false, "move_down", 9, "Moves the cursor down one line.", 31, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 340 }, -{ PROC_LINKS(move_down_10, 0), false, "move_down_10", 12, "Moves the cursor down ten lines.", 32, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 352 }, -{ PROC_LINKS(move_down_textual, 0), false, "move_down_textual", 17, "Moves down to the next line of actual text, regardless of line wrapping.", 72, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 358 }, -{ PROC_LINKS(move_down_to_blank_line, 0), false, "move_down_to_blank_line", 23, "Seeks the cursor down to the next blank line.", 45, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 411 }, -{ PROC_LINKS(move_down_to_blank_line_end, 0), false, "move_down_to_blank_line_end", 27, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 435 }, -{ PROC_LINKS(move_down_to_blank_line_skip_whitespace, 0), false, "move_down_to_blank_line_skip_whitespace", 39, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 423 }, -{ PROC_LINKS(move_left, 0), false, "move_left", 9, "Moves the cursor one character to the left.", 43, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 441 }, -{ PROC_LINKS(move_left_alpha_numeric_boundary, 0), false, "move_left_alpha_numeric_boundary", 32, "Seek left for boundary between alphanumeric characters and non-alphanumeric characters.", 87, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 518 }, -{ PROC_LINKS(move_left_alpha_numeric_or_camel_boundary, 0), false, "move_left_alpha_numeric_or_camel_boundary", 41, "Seek left for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 106, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 532 }, -{ PROC_LINKS(move_left_token_boundary, 0), false, "move_left_token_boundary", 24, "Seek left for the next beginning of a token.", 44, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 490 }, -{ PROC_LINKS(move_left_whitespace_boundary, 0), false, "move_left_whitespace_boundary", 29, "Seek left for the next boundary between whitespace and non-whitespace.", 70, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 475 }, -{ PROC_LINKS(move_left_whitespace_or_token_boundary, 0), false, "move_left_whitespace_or_token_boundary", 38, "Seek left for the next end of a token or boundary between whitespace and non-whitespace.", 88, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 504 }, -{ PROC_LINKS(move_line_down, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1533 }, -{ PROC_LINKS(move_line_up, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1527 }, -{ PROC_LINKS(move_right, 0), false, "move_right", 10, "Moves the cursor one character to the right.", 44, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 449 }, -{ PROC_LINKS(move_right_alpha_numeric_boundary, 0), false, "move_right_alpha_numeric_boundary", 33, "Seek right for boundary between alphanumeric characters and non-alphanumeric characters.", 88, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 511 }, -{ PROC_LINKS(move_right_alpha_numeric_or_camel_boundary, 0), false, "move_right_alpha_numeric_or_camel_boundary", 42, "Seek right for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 107, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 525 }, -{ PROC_LINKS(move_right_token_boundary, 0), false, "move_right_token_boundary", 25, "Seek right for the next end of a token.", 39, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 483 }, -{ PROC_LINKS(move_right_whitespace_boundary, 0), false, "move_right_whitespace_boundary", 30, "Seek right for the next boundary between whitespace and non-whitespace.", 71, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 467 }, -{ PROC_LINKS(move_right_whitespace_or_token_boundary, 0), false, "move_right_whitespace_or_token_boundary", 39, "Seek right for the next end of a token or boundary between whitespace and non-whitespace.", 89, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 497 }, -{ PROC_LINKS(move_up, 0), false, "move_up", 7, "Moves the cursor up one line.", 29, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 334 }, -{ PROC_LINKS(move_up_10, 0), false, "move_up_10", 10, "Moves the cursor up ten lines.", 30, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 346 }, -{ PROC_LINKS(move_up_to_blank_line, 0), false, "move_up_to_blank_line", 21, "Seeks the cursor up to the next blank line.", 43, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 405 }, -{ PROC_LINKS(move_up_to_blank_line_end, 0), false, "move_up_to_blank_line_end", 25, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 429 }, -{ PROC_LINKS(move_up_to_blank_line_skip_whitespace, 0), false, "move_up_to_blank_line_skip_whitespace", 37, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 417 }, -{ PROC_LINKS(multi_paste, 0), false, "multi_paste", 11, "Paste multiple entries from the clipboard at once", 49, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 229 }, -{ PROC_LINKS(multi_paste_interactive, 0), false, "multi_paste_interactive", 23, "Paste multiple lines from the clipboard history, controlled with arrow keys", 75, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 371 }, -{ PROC_LINKS(multi_paste_interactive_quick, 0), false, "multi_paste_interactive_quick", 29, "Paste multiple lines from the clipboard history, controlled by inputing the number of lines to paste", 100, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 380 }, -{ PROC_LINKS(open_all_code, 0), false, "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\\custom\\4coder_project_commands.cpp", 46, 850 }, -{ PROC_LINKS(open_all_code_recursive, 0), false, "open_all_code_recursive", 23, "Works as open_all_code but also runs in all subdirectories.", 59, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 856 }, -{ PROC_LINKS(open_file_in_quotes, 0), false, "open_file_in_quotes", 19, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file.", 94, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1618 }, -{ PROC_LINKS(open_in_other, 0), false, "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 2049 }, -{ PROC_LINKS(open_long_braces, 0), false, "open_long_braces", 16, "At the cursor, insert a '{' and '}' separated by a blank line.", 62, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 46 }, -{ PROC_LINKS(open_long_braces_break, 0), false, "open_long_braces_break", 22, "At the cursor, insert a '{' and '}break;' separated by a blank line.", 68, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 62 }, -{ PROC_LINKS(open_long_braces_semicolon, 0), false, "open_long_braces_semicolon", 26, "At the cursor, insert a '{' and '};' separated by a blank line.", 63, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 54 }, -{ PROC_LINKS(open_matching_file_cpp, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1650 }, -{ PROC_LINKS(open_panel_hsplit, 0), false, "open_panel_hsplit", 17, "Create a new panel by horizontally splitting the active panel.", 62, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 386 }, -{ PROC_LINKS(open_panel_vsplit, 0), false, "open_panel_vsplit", 17, "Create a new panel by vertically splitting the active panel.", 60, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 376 }, -{ PROC_LINKS(page_down, 0), false, "page_down", 9, "Scrolls the view down one view height and moves the cursor down one view height.", 80, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 376 }, -{ PROC_LINKS(page_up, 0), false, "page_up", 7, "Scrolls the view up one view height and moves the cursor up one view height.", 76, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 368 }, -{ PROC_LINKS(paste, 0), false, "paste", 5, "At the cursor, insert the text at the top of the clipboard.", 59, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 130 }, -{ PROC_LINKS(paste_and_indent, 0), false, "paste_and_indent", 16, "Paste from the top of clipboard and run auto-indent on the newly pasted text.", 77, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 207 }, -{ PROC_LINKS(paste_next, 0), false, "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\\custom\\4coder_clipboard.cpp", 39, 164 }, -{ PROC_LINKS(paste_next_and_indent, 0), false, "paste_next_and_indent", 21, "Paste the next item on the clipboard and run auto-indent on the newly pasted text.", 82, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 214 }, -{ PROC_LINKS(place_in_scope, 0), false, "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\\custom\\4coder_scope_commands.cpp", 44, 106 }, -{ PROC_LINKS(play_with_a_counter, 0), false, "play_with_a_counter", 19, "Example of query bar", 20, "W:\\4ed\\code\\custom\\4coder_examples.cpp", 38, 29 }, -{ PROC_LINKS(profile_clear, 0), false, "profile_clear", 13, "Clear all profiling information from 4coder's self profiler.", 60, "W:\\4ed\\code\\custom\\4coder_profile.cpp", 37, 226 }, -{ PROC_LINKS(profile_disable, 0), false, "profile_disable", 15, "Prevent 4coder's self profiler from gathering new profiling information.", 72, "W:\\4ed\\code\\custom\\4coder_profile.cpp", 37, 219 }, -{ PROC_LINKS(profile_enable, 0), false, "profile_enable", 14, "Allow 4coder's self profiler to gather new profiling information.", 65, "W:\\4ed\\code\\custom\\4coder_profile.cpp", 37, 212 }, -{ PROC_LINKS(profile_inspect, 0), true, "profile_inspect", 15, "Inspect all currently collected profiling information in 4coder's self profiler.", 80, "W:\\4ed\\code\\custom\\4coder_profile_inspect.cpp", 45, 886 }, -{ PROC_LINKS(project_command_lister, 0), false, "project_command_lister", 22, "Open a lister of all commands in the currently loaded project.", 62, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 1290 }, -{ PROC_LINKS(project_fkey_command, 0), false, "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\\custom\\4coder_project_commands.cpp", 46, 872 }, -{ PROC_LINKS(project_go_to_root_directory, 0), false, "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\\custom\\4coder_project_commands.cpp", 46, 898 }, -{ PROC_LINKS(query_replace, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1280 }, -{ PROC_LINKS(query_replace_identifier, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1301 }, -{ PROC_LINKS(query_replace_selection, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1317 }, -{ PROC_LINKS(quick_swap_buffer, 0), false, "quick_swap_buffer", 17, "Change to the most recently used buffer in this view - or to the top of the buffer stack if the most recent doesn't exist anymore", 129, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1697 }, -{ PROC_LINKS(redo, 0), false, "redo", 4, "Advances forwards through the undo history of the current buffer.", 65, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1876 }, -{ PROC_LINKS(redo_all_buffers, 0), false, "redo_all_buffers", 16, "Advances forward through the undo history in the buffer containing the most recent regular edit.", 96, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1973 }, -{ PROC_LINKS(rename_file_query, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1458 }, -{ PROC_LINKS(reopen, 0), false, "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1735 }, -{ PROC_LINKS(replace_in_all_buffers, 0), false, "replace_in_all_buffers", 22, "Queries the user for a needle and string. Replaces all occurences of needle with string in all editable buffers.", 112, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1190 }, -{ PROC_LINKS(replace_in_buffer, 0), false, "replace_in_buffer", 17, "Queries the user for a needle and string. Replaces all occurences of needle with string in the active buffer.", 109, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1181 }, -{ PROC_LINKS(replace_in_range, 0), false, "replace_in_range", 16, "Queries the user for a needle and string. Replaces all occurences of needle with string in the range between cursor and the mark in the active buffer.", 150, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1172 }, -{ PROC_LINKS(reverse_search, 0), false, "reverse_search", 14, "Begins an incremental search up through the current buffer for a user specified string.", 87, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1113 }, -{ PROC_LINKS(reverse_search_identifier, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1125 }, -{ PROC_LINKS(save, 0), false, "save", 4, "Saves the current buffer.", 25, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1725 }, -{ PROC_LINKS(save_all_dirty_buffers, 0), false, "save_all_dirty_buffers", 22, "Saves all buffers marked dirty (showing the '*' indicator).", 59, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 458 }, -{ PROC_LINKS(save_to_query, 0), false, "save_to_query", 13, "Queries the user for a file name and saves the contents of the current buffer, altering the buffer's name too.", 110, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1425 }, -{ PROC_LINKS(search, 0), false, "search", 6, "Begins an incremental search down through the current buffer for a user specified string.", 89, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1107 }, -{ PROC_LINKS(search_identifier, 0), false, "search_identifier", 17, "Begins an incremental search down through the current buffer for the word or token under the cursor.", 100, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1119 }, -{ PROC_LINKS(seek_beginning_of_line, 0), false, "seek_beginning_of_line", 22, "Seeks the cursor to the beginning of the visual line.", 53, "W:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2236 }, -{ PROC_LINKS(seek_beginning_of_textual_line, 0), false, "seek_beginning_of_textual_line", 30, "Seeks the cursor to the beginning of the line across all text.", 62, "W:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2224 }, -{ PROC_LINKS(seek_end_of_line, 0), false, "seek_end_of_line", 16, "Seeks the cursor to the end of the visual line.", 47, "W:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2242 }, -{ PROC_LINKS(seek_end_of_textual_line, 0), false, "seek_end_of_textual_line", 24, "Seeks the cursor to the end of the line across all text.", 56, "W:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2230 }, -{ PROC_LINKS(select_all, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 541 }, -{ PROC_LINKS(select_next_scope_absolute, 0), false, "select_next_scope_absolute", 26, "Finds the first scope started by '{' after the cursor and puts the cursor and mark on the '{' and '}'.", 102, "W:\\4ed\\code\\custom\\4coder_scope_commands.cpp", 44, 57 }, -{ PROC_LINKS(select_next_scope_after_current, 0), false, "select_next_scope_after_current", 31, "If a scope is selected, find first scope that starts after the selected scope. Otherwise find the first scope that starts after the cursor.", 139, "W:\\4ed\\code\\custom\\4coder_scope_commands.cpp", 44, 66 }, -{ PROC_LINKS(select_prev_scope_absolute, 0), false, "select_prev_scope_absolute", 26, "Finds the first scope started by '{' before the cursor and puts the cursor and mark on the '{' and '}'.", 103, "W:\\4ed\\code\\custom\\4coder_scope_commands.cpp", 44, 82 }, -{ PROC_LINKS(select_prev_top_most_scope, 0), false, "select_prev_top_most_scope", 26, "Finds the first scope that starts before the cursor, then finds the top most scope that contains that scope.", 108, "W:\\4ed\\code\\custom\\4coder_scope_commands.cpp", 44, 99 }, -{ PROC_LINKS(select_surrounding_scope, 0), false, "select_surrounding_scope", 24, "Finds the scope enclosed by '{' '}' surrounding the cursor and puts the cursor and mark on the '{' and '}'.", 107, "W:\\4ed\\code\\custom\\4coder_scope_commands.cpp", 44, 27 }, -{ PROC_LINKS(select_surrounding_scope_maximal, 0), false, "select_surrounding_scope_maximal", 32, "Selects the top-most scope that surrounds the cursor.", 53, "W:\\4ed\\code\\custom\\4coder_scope_commands.cpp", 44, 39 }, -{ PROC_LINKS(set_eol_mode_from_contents, 0), false, "set_eol_mode_from_contents", 26, "Sets the buffer's line ending mode to match the contents of the buffer.", 71, "W:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 125 }, -{ PROC_LINKS(set_eol_mode_to_binary, 0), false, "set_eol_mode_to_binary", 22, "Puts the buffer in bin line ending mode.", 40, "W:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 112 }, -{ PROC_LINKS(set_eol_mode_to_crlf, 0), false, "set_eol_mode_to_crlf", 20, "Puts the buffer in crlf line ending mode.", 41, "W:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 86 }, -{ PROC_LINKS(set_eol_mode_to_lf, 0), false, "set_eol_mode_to_lf", 18, "Puts the buffer in lf line ending mode.", 39, "W:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 99 }, -{ PROC_LINKS(set_face_size, 0), false, "set_face_size", 13, "Set face size of the face used by the current buffer.", 53, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 726 }, -{ PROC_LINKS(set_face_size_this_buffer, 0), false, "set_face_size_this_buffer", 25, "Set face size of the face used by the current buffer; if any other buffers are using the same face a new face is created so that only this buffer is effected", 157, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 768 }, -{ PROC_LINKS(set_mark, 0), false, "set_mark", 8, "Sets the mark to the current position of the cursor.", 52, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 115 }, -{ PROC_LINKS(set_mode_to_notepad_like, 0), false, "set_mode_to_notepad_like", 24, "Sets the edit mode to Notepad like.", 35, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 503 }, -{ PROC_LINKS(set_mode_to_original, 0), false, "set_mode_to_original", 20, "Sets the edit mode to 4coder original.", 38, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 497 }, -{ PROC_LINKS(setup_build_bat, 0), false, "setup_build_bat", 15, "Queries the user for several configuration options and initializes a new build batch script.", 92, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 1239 }, -{ PROC_LINKS(setup_build_bat_and_sh, 0), false, "setup_build_bat_and_sh", 22, "Queries the user for several configuration options and initializes a new build batch script.", 92, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 1251 }, -{ PROC_LINKS(setup_build_sh, 0), false, "setup_build_sh", 14, "Queries the user for several configuration options and initializes a new build shell script.", 92, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 1245 }, -{ PROC_LINKS(setup_new_project, 0), false, "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\\custom\\4coder_project_commands.cpp", 46, 1232 }, -{ PROC_LINKS(show_filebar, 0), false, "show_filebar", 12, "Sets the current view to show it's filebar.", 43, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 697 }, -{ PROC_LINKS(show_scrollbar, 0), false, "show_scrollbar", 14, "Sets the current view to show it's scrollbar.", 45, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 683 }, -{ PROC_LINKS(show_the_log_graph, 0), true, "show_the_log_graph", 18, "Parses *log* and displays the 'log graph' UI", 44, "W:\\4ed\\code\\custom\\4coder_log_parser.cpp", 40, 993 }, -{ PROC_LINKS(snipe_backward_whitespace_or_token_boundary, 0), false, "snipe_backward_whitespace_or_token_boundary", 43, "Delete a single, whole token on or to the left of the cursor and post it to the clipboard.", 90, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 177 }, -{ PROC_LINKS(snipe_forward_whitespace_or_token_boundary, 0), false, "snipe_forward_whitespace_or_token_boundary", 42, "Delete a single, whole token on or to the right of the cursor and post it to the clipboard.", 91, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 185 }, -{ PROC_LINKS(snippet_lister, 0), true, "snippet_lister", 14, "Opens a snippet lister for inserting whole pre-written snippets of text.", 72, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 237 }, -{ PROC_LINKS(string_repeat, 0), false, "string_repeat", 13, "Example of query_user_string and query_user_number", 50, "W:\\4ed\\code\\custom\\4coder_examples.cpp", 38, 179 }, -{ PROC_LINKS(suppress_mouse, 0), false, "suppress_mouse", 14, "Hides the mouse and causes all mosue input (clicks, position, wheel) to be ignored.", 83, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 479 }, -{ PROC_LINKS(swap_panels, 0), false, "swap_panels", 11, "Swaps the active panel with it's sibling.", 41, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1675 }, -{ PROC_LINKS(test_the_new_api, 0), false, "test_the_new_api", 16, "If you are reading this I forgot to delete this test, please let me know", 72, "W:\\4ed\\code\\custom\\4coder_examples.cpp", 38, 212 }, -{ PROC_LINKS(theme_lister, 0), true, "theme_lister", 12, "Opens an interactive list of all registered themes.", 51, "W:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 784 }, -{ PROC_LINKS(to_lowercase, 0), false, "to_lowercase", 12, "Converts all ascii text in the range between the cursor and the mark to lowercase.", 82, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 567 }, -{ PROC_LINKS(to_uppercase, 0), false, "to_uppercase", 12, "Converts all ascii text in the range between the cursor and the mark to uppercase.", 82, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 554 }, -{ PROC_LINKS(toggle_filebar, 0), false, "toggle_filebar", 14, "Toggles the visibility status of the current view's filebar.", 60, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 711 }, -{ PROC_LINKS(toggle_fps_meter, 0), false, "toggle_fps_meter", 16, "Toggles the visibility of the FPS performance meter", 51, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 720 }, -{ PROC_LINKS(toggle_fullscreen, 0), false, "toggle_fullscreen", 17, "Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.", 89, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 527 }, -{ PROC_LINKS(toggle_highlight_enclosing_scopes, 0), false, "toggle_highlight_enclosing_scopes", 33, "In code files scopes surrounding the cursor are highlighted with distinguishing colors.", 87, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 515 }, -{ PROC_LINKS(toggle_highlight_line_at_cursor, 0), false, "toggle_highlight_line_at_cursor", 31, "Toggles the line highlight at the cursor.", 41, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 509 }, -{ PROC_LINKS(toggle_line_numbers, 0), false, "toggle_line_numbers", 19, "Toggles the left margin line numbers.", 37, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 825 }, -{ PROC_LINKS(toggle_line_wrap, 0), false, "toggle_line_wrap", 16, "Toggles the line wrap setting on this buffer.", 45, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 831 }, -{ PROC_LINKS(toggle_mouse, 0), false, "toggle_mouse", 12, "Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.", 71, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 491 }, -{ PROC_LINKS(toggle_paren_matching_helper, 0), false, "toggle_paren_matching_helper", 28, "In code files matching parentheses pairs are colored with distinguishing colors.", 80, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 521 }, -{ PROC_LINKS(toggle_show_whitespace, 0), false, "toggle_show_whitespace", 22, "Toggles the current buffer's whitespace visibility status.", 58, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 816 }, -{ PROC_LINKS(toggle_virtual_whitespace, 0), false, "toggle_virtual_whitespace", 25, "Toggles virtual whitespace for all files.", 41, "W:\\4ed\\code\\custom\\4coder_code_index.cpp", 40, 1176 }, -{ PROC_LINKS(tutorial_maximize, 0), false, "tutorial_maximize", 17, "Expand the tutorial window", 26, "W:\\4ed\\code\\custom\\4coder_tutorial.cpp", 38, 20 }, -{ PROC_LINKS(tutorial_minimize, 0), false, "tutorial_minimize", 17, "Shrink the tutorial window", 26, "W:\\4ed\\code\\custom\\4coder_tutorial.cpp", 38, 34 }, -{ PROC_LINKS(uncomment_line, 0), false, "uncomment_line", 14, "If present, delete '//' at the beginning of the line after leading whitespace.", 78, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 137 }, -{ PROC_LINKS(undo, 0), false, "undo", 4, "Advances backwards through the undo history of the current buffer.", 66, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1825 }, -{ PROC_LINKS(undo_all_buffers, 0), false, "undo_all_buffers", 16, "Advances backward through the undo history in the buffer containing the most recent regular edit.", 97, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1902 }, -{ PROC_LINKS(view_buffer_other_panel, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1663 }, -{ PROC_LINKS(view_jump_list_with_lister, 0), false, "view_jump_list_with_lister", 26, "When executed on a buffer with jumps, creates a persistent lister for all the jumps", 83, "W:\\4ed\\code\\custom\\4coder_jump_lister.cpp", 41, 59 }, -{ PROC_LINKS(word_complete, 0), false, "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\\custom\\4coder_search.cpp", 36, 430 }, -{ PROC_LINKS(word_complete_drop_down, 0), false, "word_complete_drop_down", 23, "Word complete with drop down menu.", 34, "W:\\4ed\\code\\custom\\4coder_search.cpp", 36, 676 }, -{ PROC_LINKS(write_block, 0), false, "write_block", 11, "At the cursor, insert a block comment.", 38, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 94 }, -{ PROC_LINKS(write_hack, 0), false, "write_hack", 10, "At the cursor, insert a '// HACK' comment, includes user name if it was specified in config.4coder.", 99, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 82 }, -{ PROC_LINKS(write_note, 0), false, "write_note", 10, "At the cursor, insert a '// NOTE' comment, includes user name if it was specified in config.4coder.", 99, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 88 }, -{ PROC_LINKS(write_space, 0), false, "write_space", 11, "Inserts a space.", 16, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 67 }, -{ PROC_LINKS(write_text_and_auto_indent, 0), false, "write_text_and_auto_indent", 26, "Inserts text and auto-indents the line on which the cursor sits if any of the text contains 'layout punctuation' such as ;:{}()[]# and new lines.", 145, "W:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 437 }, -{ PROC_LINKS(write_text_input, 0), false, "write_text_input", 16, "Inserts whatever text was used to trigger this command.", 55, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 59 }, -{ PROC_LINKS(write_todo, 0), false, "write_todo", 10, "At the cursor, insert a '// TODO' comment, includes user name if it was specified in config.4coder.", 99, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 76 }, -{ PROC_LINKS(write_underscore, 0), false, "write_underscore", 16, "Inserts an underscore.", 22, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 73 }, -{ PROC_LINKS(write_zero_struct, 0), false, "write_zero_struct", 17, "At the cursor, insert a ' = {};'.", 33, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 100 }, +{ PROC_LINKS(allow_mouse, 0), false, "allow_mouse", 11, "Shows the mouse and causes all mouse input to be processed normally.", 68, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 485 }, +{ PROC_LINKS(auto_indent_line_at_cursor, 0), false, "auto_indent_line_at_cursor", 26, "Auto-indents the line on which the cursor sits.", 47, "w:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 417 }, +{ PROC_LINKS(auto_indent_range, 0), false, "auto_indent_range", 17, "Auto-indents the range between the cursor and the mark.", 55, "w:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 427 }, +{ PROC_LINKS(auto_indent_whole_file, 0), false, "auto_indent_whole_file", 22, "Audo-indents the entire current buffer.", 39, "w:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 408 }, +{ PROC_LINKS(backspace_alpha_numeric_boundary, 0), false, "backspace_alpha_numeric_boundary", 32, "Delete characters between the cursor position and the first alphanumeric boundary to the left.", 94, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 154 }, +{ PROC_LINKS(backspace_char, 0), false, "backspace_char", 14, "Deletes the character to the left of the cursor.", 48, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 96 }, +{ PROC_LINKS(basic_change_active_panel, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 666 }, +{ PROC_LINKS(begin_clipboard_collection_mode, 0), true, "begin_clipboard_collection_mode", 31, "Allows the user to copy multiple strings from other applications before switching to 4coder and pasting them all.", 113, "w:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 71 }, +{ PROC_LINKS(build_in_build_panel, 0), false, "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\\custom\\4coder_build_commands.cpp", 44, 159 }, +{ PROC_LINKS(build_search, 0), false, "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\\custom\\4coder_build_commands.cpp", 44, 122 }, +{ PROC_LINKS(center_view, 0), false, "center_view", 11, "Centers the view vertically on the line on which the cursor sits.", 65, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 195 }, +{ PROC_LINKS(change_active_panel, 0), false, "change_active_panel", 19, "Change the currently active panel, moving to the panel with the next highest view_id.", 85, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 360 }, +{ PROC_LINKS(change_active_panel_backwards, 0), false, "change_active_panel_backwards", 29, "Change the currently active panel, moving to the panel with the next lowest view_id.", 84, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 366 }, +{ PROC_LINKS(change_to_build_panel, 0), false, "change_to_build_panel", 21, "If the special build panel is open, makes the build panel the active panel.", 75, "w:\\4ed\\code\\custom\\4coder_build_commands.cpp", 44, 180 }, +{ PROC_LINKS(clean_all_lines, 0), false, "clean_all_lines", 15, "Removes trailing whitespace from all lines and removes all blank lines in the current buffer.", 93, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 646 }, +{ PROC_LINKS(clean_trailing_whitespace, 0), false, "clean_trailing_whitespace", 25, "Removes trailing whitespace from all lines in the current buffer.", 65, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 655 }, +{ PROC_LINKS(clear_all_themes, 0), false, "clear_all_themes", 16, "Clear the theme list", 20, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 556 }, +{ PROC_LINKS(clear_clipboard, 0), false, "clear_clipboard", 15, "Clears the history of the clipboard", 35, "w:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 221 }, +{ PROC_LINKS(click_set_cursor, 0), false, "click_set_cursor", 16, "Sets the cursor position to the mouse position.", 47, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 233 }, +{ PROC_LINKS(click_set_cursor_and_mark, 0), false, "click_set_cursor_and_mark", 25, "Sets the cursor position and mark to the mouse position.", 56, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 223 }, +{ PROC_LINKS(click_set_cursor_if_lbutton, 0), false, "click_set_cursor_if_lbutton", 27, "If the mouse left button is pressed, sets the cursor position to the mouse position.", 84, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 243 }, +{ PROC_LINKS(click_set_mark, 0), false, "click_set_mark", 14, "Sets the mark position to the mouse position.", 45, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 256 }, +{ PROC_LINKS(clipboard_record_clip, 0), false, "clipboard_record_clip", 21, "In response to a new clipboard contents events, saves the new clip onto the clipboard history", 93, "w:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 7 }, +{ PROC_LINKS(close_all_code, 0), false, "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\\custom\\4coder_project_commands.cpp", 46, 844 }, +{ PROC_LINKS(close_build_panel, 0), false, "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "w:\\4ed\\code\\custom\\4coder_build_commands.cpp", 44, 174 }, +{ PROC_LINKS(close_panel, 0), false, "close_panel", 11, "Closes the currently active panel if it is not the only panel open.", 67, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 674 }, +{ PROC_LINKS(command_documentation, 0), true, "command_documentation", 21, "Prompts the user to select a command then loads a doc buffer for that item", 74, "w:\\4ed\\code\\custom\\4coder_docs.cpp", 34, 190 }, +{ PROC_LINKS(command_lister, 0), true, "command_lister", 14, "Opens an interactive list of all registered commands.", 53, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 760 }, +{ PROC_LINKS(comment_line, 0), false, "comment_line", 12, "Insert '//' at the beginning of the line after leading whitespace.", 66, "w:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 125 }, +{ PROC_LINKS(comment_line_toggle, 0), false, "comment_line_toggle", 19, "Turns uncommented lines into commented lines and vice versa for comments starting with '//'.", 92, "w:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 149 }, +{ PROC_LINKS(copy, 0), false, "copy", 4, "Copy the text in the range from the cursor to the mark onto the clipboard.", 74, "w:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 110 }, +{ PROC_LINKS(cursor_mark_swap, 0), false, "cursor_mark_swap", 16, "Swaps the position of the cursor and the mark.", 46, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 124 }, +{ PROC_LINKS(custom_api_documentation, 0), true, "custom_api_documentation", 24, "Prompts the user to select a Custom API item then loads a doc buffer for that item", 82, "w:\\4ed\\code\\custom\\4coder_docs.cpp", 34, 175 }, +{ PROC_LINKS(cut, 0), false, "cut", 3, "Cut the text in the range from the cursor to the mark onto the clipboard.", 73, "w:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 119 }, +{ PROC_LINKS(decrease_face_size, 0), false, "decrease_face_size", 18, "Decrease the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 757 }, +{ PROC_LINKS(default_file_externally_modified, 0), false, "default_file_externally_modified", 32, "Notes the external modification of attached files by printing a message.", 72, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 2055 }, +{ PROC_LINKS(default_startup, 0), false, "default_startup", 15, "Default command for responding to a startup event", 49, "w:\\4ed\\code\\custom\\4coder_default_hooks.cpp", 43, 7 }, +{ PROC_LINKS(default_try_exit, 0), false, "default_try_exit", 16, "Default command for responding to a try-exit event", 50, "w:\\4ed\\code\\custom\\4coder_default_hooks.cpp", 43, 23 }, +{ PROC_LINKS(default_view_input_handler, 0), false, "default_view_input_handler", 26, "Input consumption loop for default view behavior", 48, "w:\\4ed\\code\\custom\\4coder_default_hooks.cpp", 43, 51 }, +{ PROC_LINKS(delete_alpha_numeric_boundary, 0), false, "delete_alpha_numeric_boundary", 29, "Delete characters between the cursor position and the first alphanumeric boundary to the right.", 95, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 161 }, +{ PROC_LINKS(delete_char, 0), false, "delete_char", 11, "Deletes the character to the right of the cursor.", 49, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 79 }, +{ PROC_LINKS(delete_current_scope, 0), false, "delete_current_scope", 20, "Deletes the braces surrounding the currently selected scope. Leaves the contents within the scope.", 99, "w:\\4ed\\code\\custom\\4coder_scope_commands.cpp", 44, 112 }, +{ PROC_LINKS(delete_file_query, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1381 }, +{ PROC_LINKS(delete_line, 0), false, "delete_line", 11, "Delete the line the on which the cursor sits.", 45, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1553 }, +{ PROC_LINKS(delete_range, 0), false, "delete_range", 12, "Deletes the text in the range between the cursor and the mark.", 62, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 134 }, +{ PROC_LINKS(display_key_codes, 0), false, "display_key_codes", 17, "Example of input handling loop", 30, "w:\\4ed\\code\\custom\\4coder_examples.cpp", 38, 90 }, +{ PROC_LINKS(display_text_input, 0), false, "display_text_input", 18, "Example of to_writable and leave_current_input_unhandled", 56, "w:\\4ed\\code\\custom\\4coder_examples.cpp", 38, 137 }, +{ PROC_LINKS(double_backspace, 0), false, "double_backspace", 16, "Example of history group helpers", 32, "w:\\4ed\\code\\custom\\4coder_examples.cpp", 38, 10 }, +{ PROC_LINKS(duplicate_line, 0), false, "duplicate_line", 14, "Create a copy of the line on which the cursor sits.", 51, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1539 }, +{ PROC_LINKS(execute_any_cli, 0), false, "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\\custom\\4coder_cli_command.cpp", 41, 22 }, +{ PROC_LINKS(execute_previous_cli, 0), false, "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\\custom\\4coder_cli_command.cpp", 41, 7 }, +{ PROC_LINKS(exit_4coder, 0), false, "exit_4coder", 11, "Attempts to close 4coder.", 25, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 844 }, +{ PROC_LINKS(goto_beginning_of_file, 0), false, "goto_beginning_of_file", 22, "Sets the cursor to the beginning of the file.", 45, "w:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2248 }, +{ PROC_LINKS(goto_end_of_file, 0), false, "goto_end_of_file", 16, "Sets the cursor to the end of the file.", 39, "w:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2256 }, +{ PROC_LINKS(goto_first_jump, 0), false, "goto_first_jump", 15, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "w:\\4ed\\code\\custom\\4coder_jump_sticky.cpp", 41, 525 }, +{ PROC_LINKS(goto_first_jump_same_panel_sticky, 0), false, "goto_first_jump_same_panel_sticky", 33, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer and views the buffer in the panel where the jump list was.", 153, "w:\\4ed\\code\\custom\\4coder_jump_sticky.cpp", 41, 542 }, +{ PROC_LINKS(goto_jump_at_cursor, 0), false, "goto_jump_at_cursor", 19, "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\\custom\\4coder_jump_sticky.cpp", 41, 348 }, +{ PROC_LINKS(goto_jump_at_cursor_same_panel, 0), false, "goto_jump_at_cursor_same_panel", 30, "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\\custom\\4coder_jump_sticky.cpp", 41, 375 }, +{ PROC_LINKS(goto_line, 0), false, "goto_line", 9, "Queries the user for a number, and jumps the cursor to the corresponding line.", 78, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 852 }, +{ PROC_LINKS(goto_next_jump, 0), false, "goto_next_jump", 14, "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\\custom\\4coder_jump_sticky.cpp", 41, 464 }, +{ PROC_LINKS(goto_next_jump_no_skips, 0), false, "goto_next_jump_no_skips", 23, "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\\custom\\4coder_jump_sticky.cpp", 41, 494 }, +{ PROC_LINKS(goto_prev_jump, 0), false, "goto_prev_jump", 14, "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\\custom\\4coder_jump_sticky.cpp", 41, 481 }, +{ PROC_LINKS(goto_prev_jump_no_skips, 0), false, "goto_prev_jump_no_skips", 23, "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\\custom\\4coder_jump_sticky.cpp", 41, 511 }, +{ PROC_LINKS(hide_filebar, 0), false, "hide_filebar", 12, "Sets the current view to hide it's filebar.", 43, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 704 }, +{ PROC_LINKS(hide_scrollbar, 0), false, "hide_scrollbar", 14, "Sets the current view to hide it's scrollbar.", 45, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 690 }, +{ PROC_LINKS(hms_demo_tutorial, 0), false, "hms_demo_tutorial", 17, "Tutorial for built in 4coder bindings and features.", 51, "w:\\4ed\\code\\custom\\4coder_tutorial.cpp", 38, 869 }, +{ PROC_LINKS(if0_off, 0), false, "if0_off", 7, "Surround the range between the cursor and mark with an '#if 0' and an '#endif'", 78, "w:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 70 }, +{ PROC_LINKS(if_read_only_goto_position, 0), false, "if_read_only_goto_position", 26, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "w:\\4ed\\code\\custom\\4coder_jump_sticky.cpp", 41, 564 }, +{ PROC_LINKS(if_read_only_goto_position_same_panel, 0), false, "if_read_only_goto_position_same_panel", 37, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "w:\\4ed\\code\\custom\\4coder_jump_sticky.cpp", 41, 581 }, +{ PROC_LINKS(increase_face_size, 0), false, "increase_face_size", 18, "Increase the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 746 }, +{ PROC_LINKS(interactive_kill_buffer, 0), true, "interactive_kill_buffer", 23, "Interactively kill an open buffer.", 34, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 520 }, +{ PROC_LINKS(interactive_new, 0), true, "interactive_new", 15, "Interactively creates a new file.", 33, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 660 }, +{ PROC_LINKS(interactive_open, 0), true, "interactive_open", 16, "Interactively opens a file.", 27, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 714 }, +{ PROC_LINKS(interactive_open_or_new, 0), true, "interactive_open_or_new", 23, "Interactively open a file out of the file system.", 49, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 611 }, +{ PROC_LINKS(interactive_switch_buffer, 0), true, "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 510 }, +{ PROC_LINKS(jump_to_definition, 0), true, "jump_to_definition", 18, "List all definitions in the code index and jump to one chosen by the user.", 74, "w:\\4ed\\code\\custom\\4coder_code_index_listers.cpp", 48, 12 }, +{ PROC_LINKS(jump_to_definition_at_cursor, 0), true, "jump_to_definition_at_cursor", 28, "Jump to the first definition in the code index matching an identifier at the cursor", 83, "w:\\4ed\\code\\custom\\4coder_code_index_listers.cpp", 48, 68 }, +{ PROC_LINKS(jump_to_last_point, 0), false, "jump_to_last_point", 18, "Read from the top of the point stack and jump there; if already there pop the top and go to the next option", 107, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1334 }, +{ PROC_LINKS(keyboard_macro_finish_recording, 0), false, "keyboard_macro_finish_recording", 31, "Stop macro recording, do nothing if macro recording is not already started", 74, "w:\\4ed\\code\\custom\\4coder_keyboard_macro.cpp", 44, 54 }, +{ PROC_LINKS(keyboard_macro_replay, 0), false, "keyboard_macro_replay", 21, "Replay the most recently recorded keyboard macro", 48, "w:\\4ed\\code\\custom\\4coder_keyboard_macro.cpp", 44, 77 }, +{ PROC_LINKS(keyboard_macro_start_recording, 0), false, "keyboard_macro_start_recording", 30, "Start macro recording, do nothing if macro recording is already started", 71, "w:\\4ed\\code\\custom\\4coder_keyboard_macro.cpp", 44, 41 }, +{ PROC_LINKS(kill_buffer, 0), false, "kill_buffer", 11, "Kills the current buffer.", 25, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1717 }, +{ PROC_LINKS(kill_tutorial, 0), false, "kill_tutorial", 13, "If there is an active tutorial, kill it.", 40, "w:\\4ed\\code\\custom\\4coder_tutorial.cpp", 38, 9 }, +{ PROC_LINKS(left_adjust_view, 0), false, "left_adjust_view", 16, "Sets the left size of the view near the x position of the cursor.", 65, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 210 }, +{ PROC_LINKS(list_all_functions_all_buffers, 0), false, "list_all_functions_all_buffers", 30, "Creates a jump list of lines from all buffers that appear to define or declare functions.", 89, "w:\\4ed\\code\\custom\\4coder_function_list.cpp", 43, 296 }, +{ PROC_LINKS(list_all_functions_all_buffers_lister, 0), true, "list_all_functions_all_buffers_lister", 37, "Creates a lister of locations that look like function definitions and declarations all buffers.", 95, "w:\\4ed\\code\\custom\\4coder_function_list.cpp", 43, 302 }, +{ PROC_LINKS(list_all_functions_current_buffer, 0), false, "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\\custom\\4coder_function_list.cpp", 43, 268 }, +{ PROC_LINKS(list_all_functions_current_buffer_lister, 0), true, "list_all_functions_current_buffer_lister", 40, "Creates a lister of locations that look like function definitions and declarations in the buffer.", 97, "w:\\4ed\\code\\custom\\4coder_function_list.cpp", 43, 278 }, +{ PROC_LINKS(list_all_locations, 0), false, "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\\custom\\4coder_search.cpp", 36, 168 }, +{ PROC_LINKS(list_all_locations_case_insensitive, 0), false, "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\\custom\\4coder_search.cpp", 36, 180 }, +{ PROC_LINKS(list_all_locations_of_identifier, 0), false, "list_all_locations_of_identifier", 32, "Reads a token or word under the cursor and lists all exact case-sensitive mathces in all open buffers.", 102, "w:\\4ed\\code\\custom\\4coder_search.cpp", 36, 192 }, +{ PROC_LINKS(list_all_locations_of_identifier_case_insensitive, 0), false, "list_all_locations_of_identifier_case_insensitive", 49, "Reads a token or word under the cursor and lists all exact case-insensitive mathces in all open buffers.", 104, "w:\\4ed\\code\\custom\\4coder_search.cpp", 36, 198 }, +{ PROC_LINKS(list_all_locations_of_selection, 0), false, "list_all_locations_of_selection", 31, "Reads the string in the selected range and lists all exact case-sensitive mathces in all open buffers.", 102, "w:\\4ed\\code\\custom\\4coder_search.cpp", 36, 204 }, +{ PROC_LINKS(list_all_locations_of_selection_case_insensitive, 0), false, "list_all_locations_of_selection_case_insensitive", 48, "Reads the string in the selected range and lists all exact case-insensitive mathces in all open buffers.", 104, "w:\\4ed\\code\\custom\\4coder_search.cpp", 36, 210 }, +{ PROC_LINKS(list_all_locations_of_type_definition, 0), false, "list_all_locations_of_type_definition", 37, "Queries user for string, lists all locations of strings that appear to define a type whose name matches the input string.", 121, "w:\\4ed\\code\\custom\\4coder_search.cpp", 36, 216 }, +{ PROC_LINKS(list_all_locations_of_type_definition_of_identifier, 0), false, "list_all_locations_of_type_definition_of_identifier", 51, "Reads a token or word under the cursor and lists all locations of strings that appear to define a type whose name matches it.", 125, "w:\\4ed\\code\\custom\\4coder_search.cpp", 36, 224 }, +{ PROC_LINKS(list_all_substring_locations, 0), false, "list_all_substring_locations", 28, "Queries the user for a string and lists all case-sensitive substring matches found in all open buffers.", 103, "w:\\4ed\\code\\custom\\4coder_search.cpp", 36, 174 }, +{ PROC_LINKS(list_all_substring_locations_case_insensitive, 0), false, "list_all_substring_locations_case_insensitive", 45, "Queries the user for a string and lists all case-insensitive substring matches found in all open buffers.", 105, "w:\\4ed\\code\\custom\\4coder_search.cpp", 36, 186 }, +{ PROC_LINKS(load_project, 0), false, "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\\custom\\4coder_project_commands.cpp", 46, 864 }, +{ PROC_LINKS(load_theme_current_buffer, 0), false, "load_theme_current_buffer", 25, "Parse the current buffer as a theme file and add the theme to the theme list. If the buffer has a .4coder postfix in it's name, it is removed when the name is saved.", 165, "w:\\4ed\\code\\custom\\4coder_config.cpp", 36, 1667 }, +{ PROC_LINKS(load_themes_default_folder, 0), false, "load_themes_default_folder", 26, "Loads all the theme files in the default theme folder.", 54, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 533 }, +{ PROC_LINKS(load_themes_hot_directory, 0), false, "load_themes_hot_directory", 25, "Loads all the theme files in the current hot directory.", 55, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 545 }, +{ PROC_LINKS(make_directory_query, 0), false, "make_directory_query", 20, "Queries the user for a name and creates a new directory with the given name.", 76, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1493 }, +{ PROC_LINKS(miblo_decrement_basic, 0), false, "miblo_decrement_basic", 21, "Decrement an integer under the cursor by one.", 45, "w:\\4ed\\code\\custom\\4coder_miblo_numbers.cpp", 43, 44 }, +{ PROC_LINKS(miblo_decrement_time_stamp, 0), false, "miblo_decrement_time_stamp", 26, "Decrement a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\custom\\4coder_miblo_numbers.cpp", 43, 237 }, +{ PROC_LINKS(miblo_decrement_time_stamp_minute, 0), false, "miblo_decrement_time_stamp_minute", 33, "Decrement a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\custom\\4coder_miblo_numbers.cpp", 43, 249 }, +{ PROC_LINKS(miblo_increment_basic, 0), false, "miblo_increment_basic", 21, "Increment an integer under the cursor by one.", 45, "w:\\4ed\\code\\custom\\4coder_miblo_numbers.cpp", 43, 29 }, +{ PROC_LINKS(miblo_increment_time_stamp, 0), false, "miblo_increment_time_stamp", 26, "Increment a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\custom\\4coder_miblo_numbers.cpp", 43, 231 }, +{ PROC_LINKS(miblo_increment_time_stamp_minute, 0), false, "miblo_increment_time_stamp_minute", 33, "Increment a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\custom\\4coder_miblo_numbers.cpp", 43, 243 }, +{ PROC_LINKS(mouse_wheel_change_face_size, 0), false, "mouse_wheel_change_face_size", 28, "Reads the state of the mouse wheel and uses it to either increase or decrease the face size.", 92, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 799 }, +{ PROC_LINKS(mouse_wheel_scroll, 0), false, "mouse_wheel_scroll", 18, "Reads the scroll wheel value from the mouse state and scrolls accordingly.", 74, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 266 }, +{ PROC_LINKS(move_down, 0), false, "move_down", 9, "Moves the cursor down one line.", 31, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 340 }, +{ PROC_LINKS(move_down_10, 0), false, "move_down_10", 12, "Moves the cursor down ten lines.", 32, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 352 }, +{ PROC_LINKS(move_down_textual, 0), false, "move_down_textual", 17, "Moves down to the next line of actual text, regardless of line wrapping.", 72, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 358 }, +{ PROC_LINKS(move_down_to_blank_line, 0), false, "move_down_to_blank_line", 23, "Seeks the cursor down to the next blank line.", 45, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 411 }, +{ PROC_LINKS(move_down_to_blank_line_end, 0), false, "move_down_to_blank_line_end", 27, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 435 }, +{ PROC_LINKS(move_down_to_blank_line_skip_whitespace, 0), false, "move_down_to_blank_line_skip_whitespace", 39, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 423 }, +{ PROC_LINKS(move_left, 0), false, "move_left", 9, "Moves the cursor one character to the left.", 43, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 441 }, +{ PROC_LINKS(move_left_alpha_numeric_boundary, 0), false, "move_left_alpha_numeric_boundary", 32, "Seek left for boundary between alphanumeric characters and non-alphanumeric characters.", 87, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 518 }, +{ PROC_LINKS(move_left_alpha_numeric_or_camel_boundary, 0), false, "move_left_alpha_numeric_or_camel_boundary", 41, "Seek left for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 106, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 532 }, +{ PROC_LINKS(move_left_token_boundary, 0), false, "move_left_token_boundary", 24, "Seek left for the next beginning of a token.", 44, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 490 }, +{ PROC_LINKS(move_left_whitespace_boundary, 0), false, "move_left_whitespace_boundary", 29, "Seek left for the next boundary between whitespace and non-whitespace.", 70, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 475 }, +{ PROC_LINKS(move_left_whitespace_or_token_boundary, 0), false, "move_left_whitespace_or_token_boundary", 38, "Seek left for the next end of a token or boundary between whitespace and non-whitespace.", 88, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 504 }, +{ PROC_LINKS(move_line_down, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1533 }, +{ PROC_LINKS(move_line_up, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1527 }, +{ PROC_LINKS(move_right, 0), false, "move_right", 10, "Moves the cursor one character to the right.", 44, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 449 }, +{ PROC_LINKS(move_right_alpha_numeric_boundary, 0), false, "move_right_alpha_numeric_boundary", 33, "Seek right for boundary between alphanumeric characters and non-alphanumeric characters.", 88, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 511 }, +{ PROC_LINKS(move_right_alpha_numeric_or_camel_boundary, 0), false, "move_right_alpha_numeric_or_camel_boundary", 42, "Seek right for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 107, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 525 }, +{ PROC_LINKS(move_right_token_boundary, 0), false, "move_right_token_boundary", 25, "Seek right for the next end of a token.", 39, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 483 }, +{ PROC_LINKS(move_right_whitespace_boundary, 0), false, "move_right_whitespace_boundary", 30, "Seek right for the next boundary between whitespace and non-whitespace.", 71, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 467 }, +{ PROC_LINKS(move_right_whitespace_or_token_boundary, 0), false, "move_right_whitespace_or_token_boundary", 39, "Seek right for the next end of a token or boundary between whitespace and non-whitespace.", 89, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 497 }, +{ PROC_LINKS(move_up, 0), false, "move_up", 7, "Moves the cursor up one line.", 29, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 334 }, +{ PROC_LINKS(move_up_10, 0), false, "move_up_10", 10, "Moves the cursor up ten lines.", 30, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 346 }, +{ PROC_LINKS(move_up_to_blank_line, 0), false, "move_up_to_blank_line", 21, "Seeks the cursor up to the next blank line.", 43, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 405 }, +{ PROC_LINKS(move_up_to_blank_line_end, 0), false, "move_up_to_blank_line_end", 25, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 429 }, +{ PROC_LINKS(move_up_to_blank_line_skip_whitespace, 0), false, "move_up_to_blank_line_skip_whitespace", 37, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 417 }, +{ PROC_LINKS(multi_paste, 0), false, "multi_paste", 11, "Paste multiple entries from the clipboard at once", 49, "w:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 229 }, +{ PROC_LINKS(multi_paste_interactive, 0), false, "multi_paste_interactive", 23, "Paste multiple lines from the clipboard history, controlled with arrow keys", 75, "w:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 371 }, +{ PROC_LINKS(multi_paste_interactive_quick, 0), false, "multi_paste_interactive_quick", 29, "Paste multiple lines from the clipboard history, controlled by inputing the number of lines to paste", 100, "w:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 380 }, +{ PROC_LINKS(open_all_code, 0), false, "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\\custom\\4coder_project_commands.cpp", 46, 850 }, +{ PROC_LINKS(open_all_code_recursive, 0), false, "open_all_code_recursive", 23, "Works as open_all_code but also runs in all subdirectories.", 59, "w:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 856 }, +{ PROC_LINKS(open_file_in_quotes, 0), false, "open_file_in_quotes", 19, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file.", 94, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1618 }, +{ PROC_LINKS(open_in_other, 0), false, "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 2049 }, +{ PROC_LINKS(open_long_braces, 0), false, "open_long_braces", 16, "At the cursor, insert a '{' and '}' separated by a blank line.", 62, "w:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 46 }, +{ PROC_LINKS(open_long_braces_break, 0), false, "open_long_braces_break", 22, "At the cursor, insert a '{' and '}break;' separated by a blank line.", 68, "w:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 62 }, +{ PROC_LINKS(open_long_braces_semicolon, 0), false, "open_long_braces_semicolon", 26, "At the cursor, insert a '{' and '};' separated by a blank line.", 63, "w:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 54 }, +{ PROC_LINKS(open_matching_file_cpp, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1650 }, +{ PROC_LINKS(open_panel_hsplit, 0), false, "open_panel_hsplit", 17, "Create a new panel by horizontally splitting the active panel.", 62, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 386 }, +{ PROC_LINKS(open_panel_vsplit, 0), false, "open_panel_vsplit", 17, "Create a new panel by vertically splitting the active panel.", 60, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 376 }, +{ PROC_LINKS(page_down, 0), false, "page_down", 9, "Scrolls the view down one view height and moves the cursor down one view height.", 80, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 376 }, +{ PROC_LINKS(page_up, 0), false, "page_up", 7, "Scrolls the view up one view height and moves the cursor up one view height.", 76, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 368 }, +{ PROC_LINKS(paste, 0), false, "paste", 5, "At the cursor, insert the text at the top of the clipboard.", 59, "w:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 130 }, +{ PROC_LINKS(paste_and_indent, 0), false, "paste_and_indent", 16, "Paste from the top of clipboard and run auto-indent on the newly pasted text.", 77, "w:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 207 }, +{ PROC_LINKS(paste_next, 0), false, "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\\custom\\4coder_clipboard.cpp", 39, 164 }, +{ PROC_LINKS(paste_next_and_indent, 0), false, "paste_next_and_indent", 21, "Paste the next item on the clipboard and run auto-indent on the newly pasted text.", 82, "w:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 214 }, +{ PROC_LINKS(place_in_scope, 0), false, "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\\custom\\4coder_scope_commands.cpp", 44, 106 }, +{ PROC_LINKS(play_with_a_counter, 0), false, "play_with_a_counter", 19, "Example of query bar", 20, "w:\\4ed\\code\\custom\\4coder_examples.cpp", 38, 29 }, +{ PROC_LINKS(profile_clear, 0), false, "profile_clear", 13, "Clear all profiling information from 4coder's self profiler.", 60, "w:\\4ed\\code\\custom\\4coder_profile.cpp", 37, 226 }, +{ PROC_LINKS(profile_disable, 0), false, "profile_disable", 15, "Prevent 4coder's self profiler from gathering new profiling information.", 72, "w:\\4ed\\code\\custom\\4coder_profile.cpp", 37, 219 }, +{ PROC_LINKS(profile_enable, 0), false, "profile_enable", 14, "Allow 4coder's self profiler to gather new profiling information.", 65, "w:\\4ed\\code\\custom\\4coder_profile.cpp", 37, 212 }, +{ PROC_LINKS(profile_inspect, 0), true, "profile_inspect", 15, "Inspect all currently collected profiling information in 4coder's self profiler.", 80, "w:\\4ed\\code\\custom\\4coder_profile_inspect.cpp", 45, 886 }, +{ PROC_LINKS(project_command_lister, 0), false, "project_command_lister", 22, "Open a lister of all commands in the currently loaded project.", 62, "w:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 1290 }, +{ PROC_LINKS(project_fkey_command, 0), false, "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\\custom\\4coder_project_commands.cpp", 46, 872 }, +{ PROC_LINKS(project_go_to_root_directory, 0), false, "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\\custom\\4coder_project_commands.cpp", 46, 898 }, +{ PROC_LINKS(query_replace, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1280 }, +{ PROC_LINKS(query_replace_identifier, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1301 }, +{ PROC_LINKS(query_replace_selection, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1317 }, +{ PROC_LINKS(quick_swap_buffer, 0), false, "quick_swap_buffer", 17, "Change to the most recently used buffer in this view - or to the top of the buffer stack if the most recent doesn't exist anymore", 129, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1697 }, +{ PROC_LINKS(redo, 0), false, "redo", 4, "Advances forwards through the undo history of the current buffer.", 65, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1876 }, +{ PROC_LINKS(redo_all_buffers, 0), false, "redo_all_buffers", 16, "Advances forward through the undo history in the buffer containing the most recent regular edit.", 96, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1973 }, +{ PROC_LINKS(rename_file_query, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1458 }, +{ PROC_LINKS(reopen, 0), false, "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1735 }, +{ PROC_LINKS(replace_in_all_buffers, 0), false, "replace_in_all_buffers", 22, "Queries the user for a needle and string. Replaces all occurences of needle with string in all editable buffers.", 112, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1190 }, +{ PROC_LINKS(replace_in_buffer, 0), false, "replace_in_buffer", 17, "Queries the user for a needle and string. Replaces all occurences of needle with string in the active buffer.", 109, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1181 }, +{ PROC_LINKS(replace_in_range, 0), false, "replace_in_range", 16, "Queries the user for a needle and string. Replaces all occurences of needle with string in the range between cursor and the mark in the active buffer.", 150, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1172 }, +{ PROC_LINKS(reverse_search, 0), false, "reverse_search", 14, "Begins an incremental search up through the current buffer for a user specified string.", 87, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1113 }, +{ PROC_LINKS(reverse_search_identifier, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1125 }, +{ PROC_LINKS(save, 0), false, "save", 4, "Saves the current buffer.", 25, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1725 }, +{ PROC_LINKS(save_all_dirty_buffers, 0), false, "save_all_dirty_buffers", 22, "Saves all buffers marked dirty (showing the '*' indicator).", 59, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 458 }, +{ PROC_LINKS(save_to_query, 0), false, "save_to_query", 13, "Queries the user for a file name and saves the contents of the current buffer, altering the buffer's name too.", 110, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1425 }, +{ PROC_LINKS(search, 0), false, "search", 6, "Begins an incremental search down through the current buffer for a user specified string.", 89, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1107 }, +{ PROC_LINKS(search_identifier, 0), false, "search_identifier", 17, "Begins an incremental search down through the current buffer for the word or token under the cursor.", 100, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1119 }, +{ PROC_LINKS(seek_beginning_of_line, 0), false, "seek_beginning_of_line", 22, "Seeks the cursor to the beginning of the visual line.", 53, "w:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2236 }, +{ PROC_LINKS(seek_beginning_of_textual_line, 0), false, "seek_beginning_of_textual_line", 30, "Seeks the cursor to the beginning of the line across all text.", 62, "w:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2224 }, +{ PROC_LINKS(seek_end_of_line, 0), false, "seek_end_of_line", 16, "Seeks the cursor to the end of the visual line.", 47, "w:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2242 }, +{ PROC_LINKS(seek_end_of_textual_line, 0), false, "seek_end_of_textual_line", 24, "Seeks the cursor to the end of the line across all text.", 56, "w:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2230 }, +{ PROC_LINKS(select_all, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 541 }, +{ PROC_LINKS(select_next_scope_absolute, 0), false, "select_next_scope_absolute", 26, "Finds the first scope started by '{' after the cursor and puts the cursor and mark on the '{' and '}'.", 102, "w:\\4ed\\code\\custom\\4coder_scope_commands.cpp", 44, 57 }, +{ PROC_LINKS(select_next_scope_after_current, 0), false, "select_next_scope_after_current", 31, "If a scope is selected, find first scope that starts after the selected scope. Otherwise find the first scope that starts after the cursor.", 139, "w:\\4ed\\code\\custom\\4coder_scope_commands.cpp", 44, 66 }, +{ PROC_LINKS(select_prev_scope_absolute, 0), false, "select_prev_scope_absolute", 26, "Finds the first scope started by '{' before the cursor and puts the cursor and mark on the '{' and '}'.", 103, "w:\\4ed\\code\\custom\\4coder_scope_commands.cpp", 44, 82 }, +{ PROC_LINKS(select_prev_top_most_scope, 0), false, "select_prev_top_most_scope", 26, "Finds the first scope that starts before the cursor, then finds the top most scope that contains that scope.", 108, "w:\\4ed\\code\\custom\\4coder_scope_commands.cpp", 44, 99 }, +{ PROC_LINKS(select_surrounding_scope, 0), false, "select_surrounding_scope", 24, "Finds the scope enclosed by '{' '}' surrounding the cursor and puts the cursor and mark on the '{' and '}'.", 107, "w:\\4ed\\code\\custom\\4coder_scope_commands.cpp", 44, 27 }, +{ PROC_LINKS(select_surrounding_scope_maximal, 0), false, "select_surrounding_scope_maximal", 32, "Selects the top-most scope that surrounds the cursor.", 53, "w:\\4ed\\code\\custom\\4coder_scope_commands.cpp", 44, 39 }, +{ PROC_LINKS(set_eol_mode_from_contents, 0), false, "set_eol_mode_from_contents", 26, "Sets the buffer's line ending mode to match the contents of the buffer.", 71, "w:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 125 }, +{ PROC_LINKS(set_eol_mode_to_binary, 0), false, "set_eol_mode_to_binary", 22, "Puts the buffer in bin line ending mode.", 40, "w:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 112 }, +{ PROC_LINKS(set_eol_mode_to_crlf, 0), false, "set_eol_mode_to_crlf", 20, "Puts the buffer in crlf line ending mode.", 41, "w:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 86 }, +{ PROC_LINKS(set_eol_mode_to_lf, 0), false, "set_eol_mode_to_lf", 18, "Puts the buffer in lf line ending mode.", 39, "w:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 99 }, +{ PROC_LINKS(set_face_size, 0), false, "set_face_size", 13, "Set face size of the face used by the current buffer.", 53, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 726 }, +{ PROC_LINKS(set_face_size_this_buffer, 0), false, "set_face_size_this_buffer", 25, "Set face size of the face used by the current buffer; if any other buffers are using the same face a new face is created so that only this buffer is effected", 157, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 768 }, +{ PROC_LINKS(set_mark, 0), false, "set_mark", 8, "Sets the mark to the current position of the cursor.", 52, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 115 }, +{ PROC_LINKS(set_mode_to_notepad_like, 0), false, "set_mode_to_notepad_like", 24, "Sets the edit mode to Notepad like.", 35, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 503 }, +{ PROC_LINKS(set_mode_to_original, 0), false, "set_mode_to_original", 20, "Sets the edit mode to 4coder original.", 38, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 497 }, +{ PROC_LINKS(setup_build_bat, 0), false, "setup_build_bat", 15, "Queries the user for several configuration options and initializes a new build batch script.", 92, "w:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 1239 }, +{ PROC_LINKS(setup_build_bat_and_sh, 0), false, "setup_build_bat_and_sh", 22, "Queries the user for several configuration options and initializes a new build batch script.", 92, "w:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 1251 }, +{ PROC_LINKS(setup_build_sh, 0), false, "setup_build_sh", 14, "Queries the user for several configuration options and initializes a new build shell script.", 92, "w:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 1245 }, +{ PROC_LINKS(setup_new_project, 0), false, "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\\custom\\4coder_project_commands.cpp", 46, 1232 }, +{ PROC_LINKS(show_filebar, 0), false, "show_filebar", 12, "Sets the current view to show it's filebar.", 43, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 697 }, +{ PROC_LINKS(show_scrollbar, 0), false, "show_scrollbar", 14, "Sets the current view to show it's scrollbar.", 45, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 683 }, +{ PROC_LINKS(show_the_log_graph, 0), true, "show_the_log_graph", 18, "Parses *log* and displays the 'log graph' UI", 44, "w:\\4ed\\code\\custom\\4coder_log_parser.cpp", 40, 993 }, +{ PROC_LINKS(snipe_backward_whitespace_or_token_boundary, 0), false, "snipe_backward_whitespace_or_token_boundary", 43, "Delete a single, whole token on or to the left of the cursor and post it to the clipboard.", 90, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 177 }, +{ PROC_LINKS(snipe_forward_whitespace_or_token_boundary, 0), false, "snipe_forward_whitespace_or_token_boundary", 42, "Delete a single, whole token on or to the right of the cursor and post it to the clipboard.", 91, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 185 }, +{ PROC_LINKS(snippet_lister, 0), true, "snippet_lister", 14, "Opens a snippet lister for inserting whole pre-written snippets of text.", 72, "w:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 237 }, +{ PROC_LINKS(string_repeat, 0), false, "string_repeat", 13, "Example of query_user_string and query_user_number", 50, "w:\\4ed\\code\\custom\\4coder_examples.cpp", 38, 179 }, +{ PROC_LINKS(suppress_mouse, 0), false, "suppress_mouse", 14, "Hides the mouse and causes all mosue input (clicks, position, wheel) to be ignored.", 83, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 479 }, +{ PROC_LINKS(swap_panels, 0), false, "swap_panels", 11, "Swaps the active panel with it's sibling.", 41, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1675 }, +{ PROC_LINKS(test_the_new_api, 0), false, "test_the_new_api", 16, "If you are reading this I forgot to delete this test, please let me know", 72, "w:\\4ed\\code\\custom\\4coder_examples.cpp", 38, 212 }, +{ PROC_LINKS(theme_lister, 0), true, "theme_lister", 12, "Opens an interactive list of all registered themes.", 51, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 784 }, +{ PROC_LINKS(to_lowercase, 0), false, "to_lowercase", 12, "Converts all ascii text in the range between the cursor and the mark to lowercase.", 82, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 567 }, +{ PROC_LINKS(to_uppercase, 0), false, "to_uppercase", 12, "Converts all ascii text in the range between the cursor and the mark to uppercase.", 82, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 554 }, +{ PROC_LINKS(toggle_filebar, 0), false, "toggle_filebar", 14, "Toggles the visibility status of the current view's filebar.", 60, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 711 }, +{ PROC_LINKS(toggle_fps_meter, 0), false, "toggle_fps_meter", 16, "Toggles the visibility of the FPS performance meter", 51, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 720 }, +{ PROC_LINKS(toggle_fullscreen, 0), false, "toggle_fullscreen", 17, "Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.", 89, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 527 }, +{ PROC_LINKS(toggle_highlight_enclosing_scopes, 0), false, "toggle_highlight_enclosing_scopes", 33, "In code files scopes surrounding the cursor are highlighted with distinguishing colors.", 87, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 515 }, +{ PROC_LINKS(toggle_highlight_line_at_cursor, 0), false, "toggle_highlight_line_at_cursor", 31, "Toggles the line highlight at the cursor.", 41, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 509 }, +{ PROC_LINKS(toggle_line_numbers, 0), false, "toggle_line_numbers", 19, "Toggles the left margin line numbers.", 37, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 825 }, +{ PROC_LINKS(toggle_line_wrap, 0), false, "toggle_line_wrap", 16, "Toggles the line wrap setting on this buffer.", 45, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 831 }, +{ PROC_LINKS(toggle_mouse, 0), false, "toggle_mouse", 12, "Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.", 71, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 491 }, +{ PROC_LINKS(toggle_paren_matching_helper, 0), false, "toggle_paren_matching_helper", 28, "In code files matching parentheses pairs are colored with distinguishing colors.", 80, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 521 }, +{ PROC_LINKS(toggle_show_whitespace, 0), false, "toggle_show_whitespace", 22, "Toggles the current buffer's whitespace visibility status.", 58, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 816 }, +{ PROC_LINKS(toggle_virtual_whitespace, 0), false, "toggle_virtual_whitespace", 25, "Toggles virtual whitespace for all files.", 41, "w:\\4ed\\code\\custom\\4coder_code_index.cpp", 40, 1176 }, +{ PROC_LINKS(tutorial_maximize, 0), false, "tutorial_maximize", 17, "Expand the tutorial window", 26, "w:\\4ed\\code\\custom\\4coder_tutorial.cpp", 38, 20 }, +{ PROC_LINKS(tutorial_minimize, 0), false, "tutorial_minimize", 17, "Shrink the tutorial window", 26, "w:\\4ed\\code\\custom\\4coder_tutorial.cpp", 38, 34 }, +{ PROC_LINKS(uncomment_line, 0), false, "uncomment_line", 14, "If present, delete '//' at the beginning of the line after leading whitespace.", 78, "w:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 137 }, +{ PROC_LINKS(undo, 0), false, "undo", 4, "Advances backwards through the undo history of the current buffer.", 66, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1825 }, +{ PROC_LINKS(undo_all_buffers, 0), false, "undo_all_buffers", 16, "Advances backward through the undo history in the buffer containing the most recent regular edit.", 97, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1902 }, +{ PROC_LINKS(view_buffer_other_panel, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1663 }, +{ PROC_LINKS(view_jump_list_with_lister, 0), false, "view_jump_list_with_lister", 26, "When executed on a buffer with jumps, creates a persistent lister for all the jumps", 83, "w:\\4ed\\code\\custom\\4coder_jump_lister.cpp", 41, 59 }, +{ PROC_LINKS(word_complete, 0), false, "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\\custom\\4coder_search.cpp", 36, 433 }, +{ PROC_LINKS(word_complete_drop_down, 0), false, "word_complete_drop_down", 23, "Word complete with drop down menu.", 34, "w:\\4ed\\code\\custom\\4coder_search.cpp", 36, 679 }, +{ PROC_LINKS(write_block, 0), false, "write_block", 11, "At the cursor, insert a block comment.", 38, "w:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 94 }, +{ PROC_LINKS(write_hack, 0), false, "write_hack", 10, "At the cursor, insert a '// HACK' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 82 }, +{ PROC_LINKS(write_note, 0), false, "write_note", 10, "At the cursor, insert a '// NOTE' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 88 }, +{ PROC_LINKS(write_space, 0), false, "write_space", 11, "Inserts a space.", 16, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 67 }, +{ PROC_LINKS(write_text_and_auto_indent, 0), false, "write_text_and_auto_indent", 26, "Inserts text and auto-indents the line on which the cursor sits if any of the text contains 'layout punctuation' such as ;:{}()[]# and new lines.", 145, "w:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 437 }, +{ PROC_LINKS(write_text_input, 0), false, "write_text_input", 16, "Inserts whatever text was used to trigger this command.", 55, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 59 }, +{ PROC_LINKS(write_todo, 0), false, "write_todo", 10, "At the cursor, insert a '// TODO' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 76 }, +{ PROC_LINKS(write_underscore, 0), false, "write_underscore", 16, "Inserts an underscore.", 22, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 73 }, +{ PROC_LINKS(write_zero_struct, 0), false, "write_zero_struct", 17, "At the cursor, insert a ' = {};'.", 33, "w:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 100 }, }; static i32 fcoder_metacmd_ID_allow_mouse = 0; static i32 fcoder_metacmd_ID_auto_indent_line_at_cursor = 1; diff --git a/fusion/4coder_fusion.cpp b/fusion/4coder_fusion.cpp index d0594a00..e949b5f2 100644 --- a/fusion/4coder_fusion.cpp +++ b/fusion/4coder_fusion.cpp @@ -118,6 +118,110 @@ CUSTOM_DOC("TODO - document fusion mode") } } +//////////////////////////////// + +CUSTOM_COMMAND_SIG(fusion_return) +CUSTOM_DOC("TODO") +{ + View_ID view = get_active_view(app, Access_ReadVisible); + Buffer_ID buffer = view_get_buffer(app, view, Access_ReadWriteVisible); + if (buffer == 0){ + buffer = view_get_buffer(app, view, Access_ReadVisible); + if (buffer != 0){ + goto_jump_at_cursor(app); + lock_jump_buffer(app, buffer); + } + } + else{ + write_text(app, string_u8_litexpr("\n")); + } +} + +CUSTOM_COMMAND_SIG(fusion_return_shift) +CUSTOM_DOC("TODO") +{ + View_ID view = get_active_view(app, Access_ReadVisible); + Buffer_ID buffer = view_get_buffer(app, view, Access_ReadWriteVisible); + if (buffer == 0){ + buffer = view_get_buffer(app, view, Access_ReadVisible); + if (buffer != 0){ + goto_jump_at_cursor_same_panel(app); + lock_jump_buffer(app, buffer); + } + } + else{ + write_text(app, string_u8_litexpr("\n")); + } +} + +function b32 +string_is_blank(String_Const_u8 string){ + b32 is_blank = true; + for (u64 i = 0; i < string.size; i += 1){ + if (!character_is_whitespace(string.str[i])){ + is_blank = false; + break; + } + } + return(is_blank); +} + +CUSTOM_COMMAND_SIG(fusion_backspace) +CUSTOM_DOC("TODO") +{ + View_ID view = get_active_view(app, Access_ReadWriteVisible); + if (view != 0){ + Scratch_Block scratch(app); + Buffer_ID buffer = view_get_buffer(app, view, Access_ReadWrite); + i64 pos = view_get_cursor_pos(app, view); + i64 line_number = get_line_number_from_pos(app, buffer, pos); + Buffer_Cursor beginning_of_line = get_line_side(app, buffer, line_number, Side_Min); + Range_i64 range = Ii64(beginning_of_line.pos, pos); + String_Const_u8 string = push_buffer_range(app, scratch, buffer, range); + if (string_is_blank(string)){ + if (line_number > 1){ + Buffer_Cursor end_of_prev_line = get_line_side(app, buffer, line_number - 1, Side_Max); + range.min = end_of_prev_line.pos; + } + buffer_replace_range(app, buffer, range, string_u8_litexpr("")); + } + else{ + current_view_boundary_delete(app, Scan_Backward, + push_boundary_list(scratch, boundary_alpha_numeric, boundary_token, + boundary_non_whitespace)); + } + } +} + +CUSTOM_COMMAND_SIG(fusion_delete) +CUSTOM_DOC("TODO") +{ + View_ID view = get_active_view(app, Access_ReadWriteVisible); + if (view != 0){ + Scratch_Block scratch(app); + Buffer_ID buffer = view_get_buffer(app, view, Access_ReadWrite); + i64 pos = view_get_cursor_pos(app, view); + i64 line_number = get_line_number_from_pos(app, buffer, pos); + Buffer_Cursor end_of_line = get_line_side(app, buffer, line_number, Side_Max); + Range_i64 range = Ii64(pos, end_of_line.pos); + String_Const_u8 string = push_buffer_range(app, scratch, buffer, range); + if (string_is_blank(string)){ + i64 line_count = buffer_get_line_count(app, buffer); + if (line_number < line_count){ + Buffer_Cursor beginning_of_prev_line = get_line_side(app, buffer, line_number + 1, Side_Min); + range.max = beginning_of_prev_line.pos; + } + buffer_replace_range(app, buffer, range, string_u8_litexpr("")); + } + else{ + current_view_boundary_delete(app, Scan_Forward, + push_boundary_list(scratch, boundary_alpha_numeric, boundary_token, + boundary_non_whitespace)); + } + } +} + +//////////////////////////////// function void setup_fusion_mapping(Mapping *mapping){ @@ -172,13 +276,13 @@ setup_fusion_mapping(Mapping *mapping){ Bind(page_up, KeyCode_PageUp); Bind(page_down, KeyCode_PageDown); - Bind(backspace_alpha_numeric_boundary, KeyCode_Backspace); - Bind(delete_alpha_numeric_boundary, KeyCode_Delete); + Bind(fusion_backspace, KeyCode_Backspace); + Bind(fusion_delete, KeyCode_Delete); Bind(snipe_backward_whitespace_or_token_boundary, KeyCode_Backspace, KeyCode_Shift); Bind(snipe_forward_whitespace_or_token_boundary, KeyCode_Delete, KeyCode_Shift); - Bind(if_read_only_goto_position, KeyCode_Return); - Bind(if_read_only_goto_position_same_panel, KeyCode_Return, KeyCode_Shift); + Bind(fusion_return, KeyCode_Return); + Bind(fusion_return_shift, KeyCode_Return, KeyCode_Shift); Bind(change_active_panel, KeyCode_Comma); Bind(change_active_panel_backwards, KeyCode_Comma, KeyCode_Shift); diff --git a/platform_linux/linux_4ed.cpp b/platform_linux/linux_4ed.cpp index 746e4dc7..efea98a6 100644 --- a/platform_linux/linux_4ed.cpp +++ b/platform_linux/linux_4ed.cpp @@ -164,6 +164,7 @@ struct Linux_Vars { Linux_Input_Chunk input; int xkb_event; int xkb_group; // active keyboard layout (0-3) + KeyCode prev_filtered_key; Key_Mode key_mode; @@ -1035,66 +1036,16 @@ linux_x11_init(int argc, char** argv, Plat_Settings* settings) { } } -global Key_Code keycode_lookup_table[255]; +global Key_Code keycode_lookup_table_physical[255]; +global Key_Code keycode_lookup_table_language[255]; + +struct SymCode { + KeySym sym; + Key_Code code; +}; internal void -linux_keycode_init(Display* dpy){ - - block_zero_array(keycode_lookup_table); - - // Find these keys by physical position, and map to QWERTY KeyCodes -#define K(k) glue(KeyCode_, k) - static const u8 positional_keys[] = { - K(1), K(2), K(3), K(4), K(5), K(6), K(7), K(8), K(9), K(0), K(Minus), K(Equal), - K(Q), K(W), K(E), K(R), K(T), K(Y), K(U), K(I), K(O), K(P), K(LeftBracket), K(RightBracket), - K(A), K(S), K(D), K(F), K(G), K(H), K(J), K(K), K(L), K(Semicolon), K(Quote), /*uk hash*/0, - K(Z), K(X), K(C), K(V), K(B), K(N), K(M), K(Comma), K(Period), K(ForwardSlash), 0, 0 - }; -#undef K - - // XKB gives the alphanumeric keys names like AE01 -> E is the row (from B-E), 01 is the column (01-12). - // to get key names in .ps file: setxkbmap -print | xkbcomp - - | xkbprint -label name - out.ps - - static const int ncols = 12; - static const int nrows = 4; - - for(int i = XkbMinLegalKeyCode; i <= XkbMaxLegalKeyCode; ++i) { - const char* name = linuxvars.xkb->names->keys[i].name; - - // alphanumeric keys - - if(name[0] == 'A' && name[1] >= 'B' && name[1] <= 'E') { - int row = (nrows - 1) - (name[1] - 'B'); - int col = (name[2] - '0') * 10 + (name[3] - '0') - 1; - - if(row >= 0 && row < nrows && col >= 0 && col < ncols) { - keycode_lookup_table[i] = positional_keys[row * ncols + col]; - } - } - - // numpad - - else if(name[0] == 'K' && name[1] == 'P' && name[2] >= '0' && name[2] <= '9' && !name[3]) { - keycode_lookup_table[i] = KeyCode_NumPad0 + name[2] - '0'; - } - - // a few special cases: - - else if(memcmp(name, "TLDE", XkbKeyNameLength) == 0) { - keycode_lookup_table[i] = KeyCode_Tick; - } else if(memcmp(name, "BKSL", XkbKeyNameLength) == 0) { - keycode_lookup_table[i] = KeyCode_BackwardSlash; - } else if(memcmp(name, "LSGT", XkbKeyNameLength) == 0) { - // UK extra key between left shift and Z - // it prints \ and | with shift. KeyCode_Backslash will be where UK # is. - keycode_lookup_table[i] = KeyCode_Ex0; - } - } - - // Find the rest by their key label - struct SymCode { KeySym sym; Key_Code code; }; - SymCode sym_table[108]; - SymCode* p = sym_table; +linux_keycode_init_common(Display* dpy, Key_Code* keycode_lookup_table, SymCode* sym_table, SymCode* p, size_t sym_table_size){ *p++ = { XK_space, KeyCode_Space }; *p++ = { XK_Tab, KeyCode_Tab }; @@ -1142,7 +1093,7 @@ linux_keycode_init(Display* dpy){ *p++ = { XK_KP_Enter, KeyCode_Return }; // NumPadEnter? const int table_size = p - sym_table; - Assert(table_size < ArrayCount(sym_table)); + Assert(table_size < sym_table_size); Key_Code next_extra = KeyCode_Ex1; const Key_Code max_extra = KeyCode_Ex29; @@ -1159,6 +1110,26 @@ linux_keycode_init(Display* dpy){ for(j = 0; j < table_size; ++j) { if(sym_table[j].sym == sym) { keycode_lookup_table[i] = sym_table[j].code; + //printf("lookup %s = %d\n", key_code_name[sym_table[j].code], i); + break; + } + } + + if(j != table_size){ + continue; + } + + // nothing found - try with shift held (needed for e.g. belgian numbers to bind). + KeySym shift_sym = NoSymbol; + + if(!XkbTranslateKeyCode(linuxvars.xkb, i, XkbBuildCoreState(ShiftMask, linuxvars.xkb_group), NULL, &shift_sym)) { + continue; + } + + for(j = 0; j < table_size; ++j) { + if(sym_table[j].sym == shift_sym) { + keycode_lookup_table[i] = sym_table[j].code; + //printf("lookup %s = %d\n", key_code_name[sym_table[j].code], i); break; } } @@ -1168,6 +1139,109 @@ linux_keycode_init(Display* dpy){ keycode_lookup_table[i] = next_extra++; } } + +} + +internal void +linux_keycode_init_language(Display* dpy, Key_Code* keycode_lookup_table){ + SymCode sym_table[300]; + SymCode* p = sym_table; + + for(unsigned int i = 0; i < 26; ++i) { + *p++ = { XK_a + i, KeyCode_A + i}; + } + + for(unsigned int i = 0; i < 26; ++i) { + *p++ = { XK_A + i, KeyCode_A + i}; + } + + for(unsigned int i = 0; i <= 9; ++i) { + *p++ = { XK_0 + i, KeyCode_0 + i}; + } + + *p++ = { XK_grave, KeyCode_Tick }; + *p++ = { XK_minus, KeyCode_Minus }; + *p++ = { XK_equal, KeyCode_Equal }; + *p++ = { XK_bracketleft, KeyCode_LeftBracket }; + *p++ = { XK_bracketright, KeyCode_RightBracket }; + *p++ = { XK_semicolon, KeyCode_Semicolon }; + *p++ = { XK_apostrophe, KeyCode_Quote }; + *p++ = { XK_comma, KeyCode_Comma }; + *p++ = { XK_period, KeyCode_Period }; + *p++ = { XK_slash, KeyCode_ForwardSlash }; + *p++ = { XK_backslash, KeyCode_BackwardSlash }; + + linux_keycode_init_common(dpy, keycode_lookup_table, sym_table, p, ArrayCount(sym_table)); +} + +internal void +linux_keycode_init_physical(Display* dpy, Key_Code* keycode_lookup_table){ + + // Find common keys by their key label + SymCode sym_table[100]; + linux_keycode_init_common(dpy, keycode_lookup_table, sym_table, sym_table, ArrayCount(sym_table)); + + // Find these keys by physical position, and map to QWERTY KeyCodes +#define K(k) glue(KeyCode_, k) + static const u8 positional_keys[] = { + K(1), K(2), K(3), K(4), K(5), K(6), K(7), K(8), K(9), K(0), K(Minus), K(Equal), + K(Q), K(W), K(E), K(R), K(T), K(Y), K(U), K(I), K(O), K(P), K(LeftBracket), K(RightBracket), + K(A), K(S), K(D), K(F), K(G), K(H), K(J), K(K), K(L), K(Semicolon), K(Quote), /*uk hash*/0, + K(Z), K(X), K(C), K(V), K(B), K(N), K(M), K(Comma), K(Period), K(ForwardSlash), 0, 0 + }; +#undef K + + // XKB gives the alphanumeric keys names like AE01 -> E is the row (from B-E), 01 is the column (01-12). + // to get key names in .ps file: setxkbmap -print | xkbcomp - - | xkbprint -label name - out.ps + + static const int ncols = 12; + static const int nrows = 4; + + for(int i = XkbMinLegalKeyCode; i <= XkbMaxLegalKeyCode; ++i) { + const char* name = linuxvars.xkb->names->keys[i].name; + + // alphanumeric keys + + if(name[0] == 'A' && name[1] >= 'B' && name[1] <= 'E') { + int row = (nrows - 1) - (name[1] - 'B'); + int col = (name[2] - '0') * 10 + (name[3] - '0') - 1; + + if(row >= 0 && row < nrows && col >= 0 && col < ncols) { + keycode_lookup_table[i] = positional_keys[row * ncols + col]; + } + } + + // numpad + + else if(name[0] == 'K' && name[1] == 'P' && name[2] >= '0' && name[2] <= '9' && !name[3]) { + + // don't overwrite - for e.g. laptops with numpad keys embedded in the normal ones, toggling with numlock + if(keycode_lookup_table[i] == 0) { + keycode_lookup_table[i] = KeyCode_NumPad0 + name[2] - '0'; + } + } + + // a few special cases: + + else if(memcmp(name, "TLDE", XkbKeyNameLength) == 0) { + keycode_lookup_table[i] = KeyCode_Tick; + } else if(memcmp(name, "BKSL", XkbKeyNameLength) == 0) { + keycode_lookup_table[i] = KeyCode_BackwardSlash; + } else if(memcmp(name, "LSGT", XkbKeyNameLength) == 0) { + // UK extra key between left shift and Z + // it prints \ and | with shift. KeyCode_Backslash will be where UK # is. + keycode_lookup_table[i] = KeyCode_Ex0; + } + } +} + +internal void +linux_keycode_init(Display* dpy){ + block_zero_array(keycode_lookup_table_physical); + block_zero_array(keycode_lookup_table_language); + + linux_keycode_init_physical(dpy, keycode_lookup_table_physical); + linux_keycode_init_language(dpy, keycode_lookup_table_language); } internal void @@ -1341,6 +1415,33 @@ linux_filter_text(Arena* arena, u8* buf, int len) { return SCu8(result, outp - result); } +internal KeyCode +linux_numlock_convert(KeyCode in){ + static const KeyCode lookup[] = { + KeyCode_Insert, + KeyCode_End, + KeyCode_Down, + KeyCode_PageDown, + KeyCode_Left, + 0, + KeyCode_Right, + KeyCode_Home, + KeyCode_Up, + KeyCode_PageUp, + 0, 0, 0, + KeyCode_Delete, + }; + + if(in >= KeyCode_NumPad0 && in <= KeyCode_NumPadDot) { + KeyCode ret = lookup[in - KeyCode_NumPad0]; + if(ret != 0) { + return ret; + } + } + + return in; +} + internal void linux_handle_x11_events() { static XEvent prev_event = {}; @@ -1350,10 +1451,16 @@ linux_handle_x11_events() { XEvent event; XNextEvent(linuxvars.dpy, &event); + b32 filtered = false; if (XFilterEvent(&event, None) == True){ - continue; + filtered = true; + if(event.type != KeyPress && event.type != KeyRelease) { + continue; + } } + u64 event_id = (u64)event.xkey.serial << 32 | event.xkey.time; + switch(event.type) { case KeyPress: { should_step = true; @@ -1383,22 +1490,55 @@ linux_handle_x11_events() { add_modifier(mods, KeyCode_Shift); } - Key_Code key = keycode_lookup_table[(u8)event.xkey.keycode]; - //printf("key %d = %s\n", event.xkey.keycode, key_code_name[key]); + Key_Code key; + if(linuxvars.key_mode == KeyMode_Physical) { + key = keycode_lookup_table_physical[(u8)event.xkey.keycode]; + } else { + key = keycode_lookup_table_language[(u8)event.xkey.keycode]; + } + + if(!(state & Mod2Mask)) { + key = linux_numlock_convert(key); + } + + //printf("key %d = %s (f:%d)\n", event.xkey.keycode, key_code_name[key], filtered); + + b32 is_dead = false; + if (keysym >= XK_dead_grave && keysym <= XK_dead_greek && len == 0) { + is_dead = true; + } + + if(!is_dead && filtered) { + linuxvars.prev_filtered_key = key; + break; + } + + // send a keycode for the key after the dead key + if(!key && linuxvars.prev_filtered_key) { + key = linuxvars.prev_filtered_key; + linuxvars.prev_filtered_key = 0; + } Input_Event* key_event = NULL; if(key) { add_modifier(mods, key); + // printf(" push key %d\n", key); + key_event = push_input_event(&linuxvars.frame_arena, &linuxvars.input.trans.event_list); key_event->kind = InputEventKind_KeyStroke; key_event->key.code = key; key_event->key.modifiers = copy_modifier_set(&linuxvars.frame_arena, mods); + key_event->key.flags = 0; + if (is_dead){ + key_event->key.flags |= KeyFlag_IsDeadKey; + } } Input_Event* text_event = NULL; if(status == XLookupChars || status == XLookupBoth) { String_Const_u8 str = linux_filter_text(&linuxvars.frame_arena, buf, len); if(str.size) { + // printf(" push txt %d\n", key); text_event = push_input_event(&linuxvars.frame_arena, &linuxvars.input.trans.event_list); text_event->kind = InputEventKind_TextInsert; text_event->text.string = str; @@ -1408,7 +1548,6 @@ linux_handle_x11_events() { if(key_event && text_event) { key_event->key.first_dependent_text = text_event; } - } break; case KeyRelease: { @@ -1422,7 +1561,17 @@ linux_handle_x11_events() { set_modifier(mods, KeyCode_CapsLock, state & LockMask); set_modifier(mods, KeyCode_Alt, state & Mod1Mask); - Key_Code key = keycode_lookup_table[(u8)event.xkey.keycode]; + Key_Code key; + if(linuxvars.key_mode == KeyMode_Physical) { + key = keycode_lookup_table_physical[(u8)event.xkey.keycode]; + } else { + key = keycode_lookup_table_language[(u8)event.xkey.keycode]; + } + + // num lock off -> convert KP keys to Insert, Home, End etc. + if(!(state & Mod2Mask)) { + key = linux_numlock_convert(key); + } Input_Event* key_event = NULL; if(key) {