Cleanup and bug fixes

master
Allen Webster 2018-10-05 18:42:56 -07:00
parent 784d77f7f8
commit 1ca1dc1395
28 changed files with 238 additions and 208 deletions

View File

@ -1,4 +1,3 @@
#if !defined(FCODER_TYPES_H)
#define FCODER_TYPES_H
@ -188,6 +187,8 @@ ENUM(uint32_t, Buffer_Create_Flag){
BufferCreate_MustAttachToFile = 0x10,
/* DOC(Indicates that when create_buffer searches for already existing buffers that match the name parameter, it should only search by buffer name, and that it should not attach a file to the buffer even if it can. Caution! Buffers that don't have attached files cannot be saved.) */
BufferCreate_NeverAttachToFile = 0x20,
/* DOC(Normally the new file hook is called on any created buffer. Passing this flag will prevent the new file hook from being called automatically by the core.) */
BufferCreate_SuppressNewFileHook = 0x40,
};
/* DOC(Buffer_Creation_Data is a struct used as a local handle for the creation of a buffer. )

View File

@ -1,4 +1,4 @@
config := [version] {assignment}
sconfig := [version] {assignment}
version := "version" "(" INTEGER ")" ";"
assignment := lvalue "=" rvalue ";"

View File

@ -45,21 +45,35 @@ COMMAND_CALLER_HOOK(default_command_caller){
Managed_Scope scope = view_get_managed_scope(app, view.view_id);
managed_variable_set(app, scope, view_next_rewrite_loc, 0);
if (fcoder_mode == FCoderMode_NotepadLike){
managed_variable_set(app, scope, view_snap_mark_to_cursor, true);
for (View_Summary view_it = get_view_first(app, AccessAll);
view_it.exists;
get_view_next(app, &view_it, AccessAll)){
Managed_Scope scope_it = view_get_managed_scope(app, view_it.view_id);
managed_variable_set(app, scope_it, view_snap_mark_to_cursor, true);
}
}
////
exec_command(app, cmd);
////
uint64_t next_rewrite = 0;
managed_variable_get(app, scope, view_next_rewrite_loc, &next_rewrite);
managed_variable_set(app, scope, view_rewrite_loc, next_rewrite);
if (fcoder_mode == FCoderMode_NotepadLike){
uint64_t val = 0;
if (managed_variable_get(app, scope, view_snap_mark_to_cursor, &val)){
if (val != 0){
view = get_view(app, view.view_id, AccessAll);
view_set_mark(app, &view, seek_pos(view.cursor.pos));
for (View_Summary view_it = get_view_first(app, AccessAll);
view_it.exists;
get_view_next(app, &view_it, AccessAll)){
Managed_Scope scope_it = view_get_managed_scope(app, view_it.view_id);
uint64_t val = 0;
if (managed_variable_get(app, scope_it, view_snap_mark_to_cursor, &val)){
if (val != 0){
view_set_mark(app, &view_it, seek_pos(view_it.cursor.pos));
}
}
}
}
return(0);
}
@ -318,7 +332,7 @@ RENDER_CALLER_SIG(default_render_caller){
}
// NOTE(allen): Line highlight setup
if (highlight_line_at_cursor){
if (highlight_line_at_cursor && is_active_view){
Theme_Color color = {0};
color.tag = Stag_Highlight_Cursor_Line;
get_theme_colors(app, &color, 1);
@ -690,9 +704,11 @@ OPEN_FILE_HOOK_SIG(default_file_settings){
}
OPEN_FILE_HOOK_SIG(default_new_file){
#if 0
Buffer_Summary buffer = get_buffer(app, buffer_id, AccessOpen);
char str[] = "/*\nNew File\n*/\n\n\n";
buffer_replace_range(app, &buffer, 0, 0, str, sizeof(str)-1);
#endif
// no meaning for return
return(0);

View File

@ -68,9 +68,6 @@ CUSTOM_COMMAND_SIG(goto_prev_jump_no_skips_sticky);
CUSTOM_COMMAND_SIG(goto_prev_jump_sticky);
CUSTOM_COMMAND_SIG(hide_filebar);
CUSTOM_COMMAND_SIG(hide_scrollbar);
CUSTOM_COMMAND_SIG(highlight_next_scope_absolute);
CUSTOM_COMMAND_SIG(highlight_prev_scope_absolute);
CUSTOM_COMMAND_SIG(highlight_surrounding_scope);
CUSTOM_COMMAND_SIG(if0_off);
CUSTOM_COMMAND_SIG(increase_face_size);
CUSTOM_COMMAND_SIG(increase_line_wrap);
@ -185,6 +182,9 @@ CUSTOM_COMMAND_SIG(seek_whitespace_right);
CUSTOM_COMMAND_SIG(seek_whitespace_up);
CUSTOM_COMMAND_SIG(seek_whitespace_up_end_line);
CUSTOM_COMMAND_SIG(select_all);
CUSTOM_COMMAND_SIG(select_next_scope_absolute);
CUSTOM_COMMAND_SIG(select_prev_scope_absolute);
CUSTOM_COMMAND_SIG(select_surrounding_scope);
CUSTOM_COMMAND_SIG(set_bindings_choose);
CUSTOM_COMMAND_SIG(set_bindings_default);
CUSTOM_COMMAND_SIG(set_bindings_mac_default);
@ -265,7 +265,7 @@ static Command_Metadata fcoder_metacmd_table[216] = {
{ PROC_LINKS(decrease_face_size, 0), "decrease_face_size", 18, "Decrease the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 577 },
{ PROC_LINKS(decrease_line_wrap, 0), "decrease_line_wrap", 18, "Decrases the current buffer's width for line wrapping.", 54, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 554 },
{ PROC_LINKS(delete_char, 0), "delete_char", 11, "Deletes the character to the right of the cursor.", 49, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 56 },
{ PROC_LINKS(delete_current_scope, 0), "delete_current_scope", 20, "Deletes the braces surrounding the currently selected scope. Leaves the contents within the scope.", 99, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 523 },
{ PROC_LINKS(delete_current_scope, 0), "delete_current_scope", 20, "Deletes the braces surrounding the currently selected scope. Leaves the contents within the scope.", 99, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 526 },
{ PROC_LINKS(delete_file_query, 0), "delete_file_query", 17, "Deletes the file of the current buffer if 4coder has the appropriate access rights. Will ask the user for confirmation first.", 125, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1123 },
{ PROC_LINKS(delete_line, 0), "delete_line", 11, "Delete the line the on which the cursor sits.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1373 },
{ PROC_LINKS(delete_range, 0), "delete_range", 12, "Deletes the text in the range between the cursor and the mark.", 62, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 109 },
@ -296,9 +296,6 @@ static Command_Metadata fcoder_metacmd_table[216] = {
{ PROC_LINKS(goto_prev_jump_sticky, 0), "goto_prev_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 487 },
{ PROC_LINKS(hide_filebar, 0), "hide_filebar", 12, "Sets the current view to hide it's filebar.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 517 },
{ PROC_LINKS(hide_scrollbar, 0), "hide_scrollbar", 14, "Sets the current view to hide it's scrollbar.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 503 },
{ PROC_LINKS(highlight_next_scope_absolute, 0), "highlight_next_scope_absolute", 29, "Finds the first scope started by '{' after the cursor and puts the cursor and mark on the '{' and '}'.", 102, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 400 },
{ PROC_LINKS(highlight_prev_scope_absolute, 0), "highlight_prev_scope_absolute", 29, "Finds the first scope started by '{' before the cursor and puts the cursor and mark on the '{' and '}'.", 103, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 419 },
{ PROC_LINKS(highlight_surrounding_scope, 0), "highlight_surrounding_scope", 27, "Finds the scope enclosed by '{' '}' surrounding the cursor and puts the cursor and mark on the '{' and '}'.", 107, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 385 },
{ PROC_LINKS(if0_off, 0), "if0_off", 7, "Surround the range between the cursor and mark with an '#if 0' and an '#endif'", 78, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 81 },
{ PROC_LINKS(increase_face_size, 0), "increase_face_size", 18, "Increase the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 565 },
{ PROC_LINKS(increase_line_wrap, 0), "increase_line_wrap", 18, "Increases the current buffer's width for line wrapping.", 55, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 543 },
@ -373,7 +370,7 @@ static Command_Metadata fcoder_metacmd_table[216] = {
{ PROC_LINKS(paste_and_indent, 0), "paste_and_indent", 16, "Paste from the top of clipboard and run auto-indent on the newly pasted text.", 77, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 134 },
{ PROC_LINKS(paste_next, 0), "paste_next", 10, "If the previous command was paste or paste_next, replaces the paste range with the next text down on the clipboard, otherwise operates as the paste command.", 156, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 85 },
{ PROC_LINKS(paste_next_and_indent, 0), "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\\4coder_clipboard.cpp", 32, 141 },
{ PROC_LINKS(place_in_scope, 0), "place_in_scope", 14, "Wraps the code contained in the range between cursor and mark with a new curly brace scope.", 91, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 517 },
{ PROC_LINKS(place_in_scope, 0), "place_in_scope", 14, "Wraps the code contained in the range between cursor and mark with a new curly brace scope.", 91, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 520 },
{ PROC_LINKS(project_command_lister, 0), "project_command_lister", 22, "Open a lister of all commands in the currently loaded project.", 62, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1529 },
{ PROC_LINKS(project_fkey_command, 0), "project_fkey_command", 20, "Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.", 175, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1090 },
{ PROC_LINKS(project_go_to_root_directory, 0), "project_go_to_root_directory", 28, "Changes 4coder's hot directory to the root directory of the currently loaded project. With no loaded project nothing hapepns.", 125, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1115 },
@ -391,7 +388,7 @@ static Command_Metadata fcoder_metacmd_table[216] = {
{ PROC_LINKS(save, 0), "save", 4, "Saves the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1570 },
{ PROC_LINKS(save_all_dirty_buffers, 0), "save_all_dirty_buffers", 22, "Saves all buffers marked dirty (showing the '*' indicator).", 59, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1093 },
{ PROC_LINKS(save_to_query, 0), "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\\4coder_base_commands.cpp", 36, 1149 },
{ PROC_LINKS(scope_absorb_down, 0), "scope_absorb_down", 17, "If a scope is currently selected, and a statement or block statement is present below the current scope, the statement is moved into the scope.", 143, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 774 },
{ PROC_LINKS(scope_absorb_down, 0), "scope_absorb_down", 17, "If a scope is currently selected, and a statement or block statement is present below the current scope, the statement is moved into the scope.", 143, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 777 },
{ PROC_LINKS(search, 0), "search", 6, "Begins an incremental search down through the current buffer for a user specified string.", 89, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 852 },
{ PROC_LINKS(search_identifier, 0), "search_identifier", 17, "Begins an incremental search down through the current buffer for the word or token under the cursor.", 100, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 866 },
{ PROC_LINKS(seek_alphanumeric_left, 0), "seek_alphanumeric_left", 22, "Seek left for boundary between alphanumeric characters and non-alphanumeric characters.", 87, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1238 },
@ -413,6 +410,9 @@ static Command_Metadata fcoder_metacmd_table[216] = {
{ PROC_LINKS(seek_whitespace_up, 0), "seek_whitespace_up", 18, "Seeks the cursor up to the next blank line.", 43, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1091 },
{ PROC_LINKS(seek_whitespace_up_end_line, 0), "seek_whitespace_up_end_line", 27, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1155 },
{ PROC_LINKS(select_all, 0), "select_all", 10, "Puts the cursor at the top of the file, and the mark at the bottom of the file.", 79, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 362 },
{ PROC_LINKS(select_next_scope_absolute, 0), "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\\4coder_scope_commands.cpp", 37, 401 },
{ PROC_LINKS(select_prev_scope_absolute, 0), "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\\4coder_scope_commands.cpp", 37, 421 },
{ PROC_LINKS(select_surrounding_scope, 0), "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\\4coder_scope_commands.cpp", 37, 385 },
{ PROC_LINKS(set_bindings_choose, 0), "set_bindings_choose", 19, "Remap keybindings using the 'choose' mapping rule.", 50, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 47 },
{ PROC_LINKS(set_bindings_default, 0), "set_bindings_default", 20, "Remap keybindings using the 'default' mapping rule.", 51, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 61 },
{ PROC_LINKS(set_bindings_mac_default, 0), "set_bindings_mac_default", 24, "Remap keybindings using the 'mac-default' mapping rule.", 55, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 75 },
@ -513,123 +513,123 @@ static int32_t fcoder_metacmd_ID_goto_prev_jump_no_skips_sticky = 55;
static int32_t fcoder_metacmd_ID_goto_prev_jump_sticky = 56;
static int32_t fcoder_metacmd_ID_hide_filebar = 57;
static int32_t fcoder_metacmd_ID_hide_scrollbar = 58;
static int32_t fcoder_metacmd_ID_highlight_next_scope_absolute = 59;
static int32_t fcoder_metacmd_ID_highlight_prev_scope_absolute = 60;
static int32_t fcoder_metacmd_ID_highlight_surrounding_scope = 61;
static int32_t fcoder_metacmd_ID_if0_off = 62;
static int32_t fcoder_metacmd_ID_increase_face_size = 63;
static int32_t fcoder_metacmd_ID_increase_line_wrap = 64;
static int32_t fcoder_metacmd_ID_interactive_kill_buffer = 65;
static int32_t fcoder_metacmd_ID_interactive_new = 66;
static int32_t fcoder_metacmd_ID_interactive_open = 67;
static int32_t fcoder_metacmd_ID_interactive_open_or_new = 68;
static int32_t fcoder_metacmd_ID_interactive_switch_buffer = 69;
static int32_t fcoder_metacmd_ID_kill_buffer = 70;
static int32_t fcoder_metacmd_ID_left_adjust_view = 71;
static int32_t fcoder_metacmd_ID_list_all_functions_all_buffers = 72;
static int32_t fcoder_metacmd_ID_list_all_functions_all_buffers_lister = 73;
static int32_t fcoder_metacmd_ID_list_all_functions_current_buffer = 74;
static int32_t fcoder_metacmd_ID_list_all_functions_current_buffer_lister = 75;
static int32_t fcoder_metacmd_ID_list_all_locations = 76;
static int32_t fcoder_metacmd_ID_list_all_locations_case_insensitive = 77;
static int32_t fcoder_metacmd_ID_list_all_locations_of_identifier = 78;
static int32_t fcoder_metacmd_ID_list_all_locations_of_identifier_case_insensitive = 79;
static int32_t fcoder_metacmd_ID_list_all_locations_of_selection = 80;
static int32_t fcoder_metacmd_ID_list_all_locations_of_selection_case_insensitive = 81;
static int32_t fcoder_metacmd_ID_list_all_locations_of_type_definition = 82;
static int32_t fcoder_metacmd_ID_list_all_locations_of_type_definition_of_identifier = 83;
static int32_t fcoder_metacmd_ID_list_all_substring_locations = 84;
static int32_t fcoder_metacmd_ID_list_all_substring_locations_case_insensitive = 85;
static int32_t fcoder_metacmd_ID_lister__activate = 86;
static int32_t fcoder_metacmd_ID_lister__backspace_text_field = 87;
static int32_t fcoder_metacmd_ID_lister__backspace_text_field__default = 88;
static int32_t fcoder_metacmd_ID_lister__backspace_text_field__file_path = 89;
static int32_t fcoder_metacmd_ID_lister__mouse_press = 90;
static int32_t fcoder_metacmd_ID_lister__mouse_release = 91;
static int32_t fcoder_metacmd_ID_lister__move_down = 92;
static int32_t fcoder_metacmd_ID_lister__move_down__default = 93;
static int32_t fcoder_metacmd_ID_lister__move_up = 94;
static int32_t fcoder_metacmd_ID_lister__move_up__default = 95;
static int32_t fcoder_metacmd_ID_lister__quit = 96;
static int32_t fcoder_metacmd_ID_lister__repaint = 97;
static int32_t fcoder_metacmd_ID_lister__wheel_scroll = 98;
static int32_t fcoder_metacmd_ID_lister__write_character = 99;
static int32_t fcoder_metacmd_ID_lister__write_character__default = 100;
static int32_t fcoder_metacmd_ID_lister__write_character__file_path = 101;
static int32_t fcoder_metacmd_ID_lister__write_character__fixed_list = 102;
static int32_t fcoder_metacmd_ID_load_project = 103;
static int32_t fcoder_metacmd_ID_make_directory_query = 104;
static int32_t fcoder_metacmd_ID_mouse_wheel_scroll = 105;
static int32_t fcoder_metacmd_ID_move_down = 106;
static int32_t fcoder_metacmd_ID_move_down_10 = 107;
static int32_t fcoder_metacmd_ID_move_down_textual = 108;
static int32_t fcoder_metacmd_ID_move_left = 109;
static int32_t fcoder_metacmd_ID_move_line_down = 110;
static int32_t fcoder_metacmd_ID_move_line_up = 111;
static int32_t fcoder_metacmd_ID_move_right = 112;
static int32_t fcoder_metacmd_ID_move_up = 113;
static int32_t fcoder_metacmd_ID_move_up_10 = 114;
static int32_t fcoder_metacmd_ID_newline_or_goto_position_direct = 115;
static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_direct = 116;
static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_sticky = 117;
static int32_t fcoder_metacmd_ID_newline_or_goto_position_sticky = 118;
static int32_t fcoder_metacmd_ID_open_all_code = 119;
static int32_t fcoder_metacmd_ID_open_all_code_recursive = 120;
static int32_t fcoder_metacmd_ID_open_color_tweaker = 121;
static int32_t fcoder_metacmd_ID_open_file_in_quotes = 122;
static int32_t fcoder_metacmd_ID_open_in_other = 123;
static int32_t fcoder_metacmd_ID_open_long_braces = 124;
static int32_t fcoder_metacmd_ID_open_long_braces_break = 125;
static int32_t fcoder_metacmd_ID_open_long_braces_semicolon = 126;
static int32_t fcoder_metacmd_ID_open_matching_file_cpp = 127;
static int32_t fcoder_metacmd_ID_open_panel_hsplit = 128;
static int32_t fcoder_metacmd_ID_open_panel_vsplit = 129;
static int32_t fcoder_metacmd_ID_page_down = 130;
static int32_t fcoder_metacmd_ID_page_up = 131;
static int32_t fcoder_metacmd_ID_paste = 132;
static int32_t fcoder_metacmd_ID_paste_and_indent = 133;
static int32_t fcoder_metacmd_ID_paste_next = 134;
static int32_t fcoder_metacmd_ID_paste_next_and_indent = 135;
static int32_t fcoder_metacmd_ID_place_in_scope = 136;
static int32_t fcoder_metacmd_ID_project_command_lister = 137;
static int32_t fcoder_metacmd_ID_project_fkey_command = 138;
static int32_t fcoder_metacmd_ID_project_go_to_root_directory = 139;
static int32_t fcoder_metacmd_ID_query_replace = 140;
static int32_t fcoder_metacmd_ID_query_replace_identifier = 141;
static int32_t fcoder_metacmd_ID_query_replace_selection = 142;
static int32_t fcoder_metacmd_ID_redo = 143;
static int32_t fcoder_metacmd_ID_reload_themes = 144;
static int32_t fcoder_metacmd_ID_remap_interactive = 145;
static int32_t fcoder_metacmd_ID_rename_file_query = 146;
static int32_t fcoder_metacmd_ID_reopen = 147;
static int32_t fcoder_metacmd_ID_replace_in_range = 148;
static int32_t fcoder_metacmd_ID_reverse_search = 149;
static int32_t fcoder_metacmd_ID_reverse_search_identifier = 150;
static int32_t fcoder_metacmd_ID_save = 151;
static int32_t fcoder_metacmd_ID_save_all_dirty_buffers = 152;
static int32_t fcoder_metacmd_ID_save_to_query = 153;
static int32_t fcoder_metacmd_ID_scope_absorb_down = 154;
static int32_t fcoder_metacmd_ID_search = 155;
static int32_t fcoder_metacmd_ID_search_identifier = 156;
static int32_t fcoder_metacmd_ID_seek_alphanumeric_left = 157;
static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_left = 158;
static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_right = 159;
static int32_t fcoder_metacmd_ID_seek_alphanumeric_right = 160;
static int32_t fcoder_metacmd_ID_seek_beginning_of_line = 161;
static int32_t fcoder_metacmd_ID_seek_beginning_of_textual_line = 162;
static int32_t fcoder_metacmd_ID_seek_end_of_line = 163;
static int32_t fcoder_metacmd_ID_seek_end_of_textual_line = 164;
static int32_t fcoder_metacmd_ID_seek_token_left = 165;
static int32_t fcoder_metacmd_ID_seek_token_right = 166;
static int32_t fcoder_metacmd_ID_seek_white_or_token_left = 167;
static int32_t fcoder_metacmd_ID_seek_white_or_token_right = 168;
static int32_t fcoder_metacmd_ID_seek_whitespace_down = 169;
static int32_t fcoder_metacmd_ID_seek_whitespace_down_end_line = 170;
static int32_t fcoder_metacmd_ID_seek_whitespace_left = 171;
static int32_t fcoder_metacmd_ID_seek_whitespace_right = 172;
static int32_t fcoder_metacmd_ID_seek_whitespace_up = 173;
static int32_t fcoder_metacmd_ID_seek_whitespace_up_end_line = 174;
static int32_t fcoder_metacmd_ID_select_all = 175;
static int32_t fcoder_metacmd_ID_if0_off = 59;
static int32_t fcoder_metacmd_ID_increase_face_size = 60;
static int32_t fcoder_metacmd_ID_increase_line_wrap = 61;
static int32_t fcoder_metacmd_ID_interactive_kill_buffer = 62;
static int32_t fcoder_metacmd_ID_interactive_new = 63;
static int32_t fcoder_metacmd_ID_interactive_open = 64;
static int32_t fcoder_metacmd_ID_interactive_open_or_new = 65;
static int32_t fcoder_metacmd_ID_interactive_switch_buffer = 66;
static int32_t fcoder_metacmd_ID_kill_buffer = 67;
static int32_t fcoder_metacmd_ID_left_adjust_view = 68;
static int32_t fcoder_metacmd_ID_list_all_functions_all_buffers = 69;
static int32_t fcoder_metacmd_ID_list_all_functions_all_buffers_lister = 70;
static int32_t fcoder_metacmd_ID_list_all_functions_current_buffer = 71;
static int32_t fcoder_metacmd_ID_list_all_functions_current_buffer_lister = 72;
static int32_t fcoder_metacmd_ID_list_all_locations = 73;
static int32_t fcoder_metacmd_ID_list_all_locations_case_insensitive = 74;
static int32_t fcoder_metacmd_ID_list_all_locations_of_identifier = 75;
static int32_t fcoder_metacmd_ID_list_all_locations_of_identifier_case_insensitive = 76;
static int32_t fcoder_metacmd_ID_list_all_locations_of_selection = 77;
static int32_t fcoder_metacmd_ID_list_all_locations_of_selection_case_insensitive = 78;
static int32_t fcoder_metacmd_ID_list_all_locations_of_type_definition = 79;
static int32_t fcoder_metacmd_ID_list_all_locations_of_type_definition_of_identifier = 80;
static int32_t fcoder_metacmd_ID_list_all_substring_locations = 81;
static int32_t fcoder_metacmd_ID_list_all_substring_locations_case_insensitive = 82;
static int32_t fcoder_metacmd_ID_lister__activate = 83;
static int32_t fcoder_metacmd_ID_lister__backspace_text_field = 84;
static int32_t fcoder_metacmd_ID_lister__backspace_text_field__default = 85;
static int32_t fcoder_metacmd_ID_lister__backspace_text_field__file_path = 86;
static int32_t fcoder_metacmd_ID_lister__mouse_press = 87;
static int32_t fcoder_metacmd_ID_lister__mouse_release = 88;
static int32_t fcoder_metacmd_ID_lister__move_down = 89;
static int32_t fcoder_metacmd_ID_lister__move_down__default = 90;
static int32_t fcoder_metacmd_ID_lister__move_up = 91;
static int32_t fcoder_metacmd_ID_lister__move_up__default = 92;
static int32_t fcoder_metacmd_ID_lister__quit = 93;
static int32_t fcoder_metacmd_ID_lister__repaint = 94;
static int32_t fcoder_metacmd_ID_lister__wheel_scroll = 95;
static int32_t fcoder_metacmd_ID_lister__write_character = 96;
static int32_t fcoder_metacmd_ID_lister__write_character__default = 97;
static int32_t fcoder_metacmd_ID_lister__write_character__file_path = 98;
static int32_t fcoder_metacmd_ID_lister__write_character__fixed_list = 99;
static int32_t fcoder_metacmd_ID_load_project = 100;
static int32_t fcoder_metacmd_ID_make_directory_query = 101;
static int32_t fcoder_metacmd_ID_mouse_wheel_scroll = 102;
static int32_t fcoder_metacmd_ID_move_down = 103;
static int32_t fcoder_metacmd_ID_move_down_10 = 104;
static int32_t fcoder_metacmd_ID_move_down_textual = 105;
static int32_t fcoder_metacmd_ID_move_left = 106;
static int32_t fcoder_metacmd_ID_move_line_down = 107;
static int32_t fcoder_metacmd_ID_move_line_up = 108;
static int32_t fcoder_metacmd_ID_move_right = 109;
static int32_t fcoder_metacmd_ID_move_up = 110;
static int32_t fcoder_metacmd_ID_move_up_10 = 111;
static int32_t fcoder_metacmd_ID_newline_or_goto_position_direct = 112;
static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_direct = 113;
static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_sticky = 114;
static int32_t fcoder_metacmd_ID_newline_or_goto_position_sticky = 115;
static int32_t fcoder_metacmd_ID_open_all_code = 116;
static int32_t fcoder_metacmd_ID_open_all_code_recursive = 117;
static int32_t fcoder_metacmd_ID_open_color_tweaker = 118;
static int32_t fcoder_metacmd_ID_open_file_in_quotes = 119;
static int32_t fcoder_metacmd_ID_open_in_other = 120;
static int32_t fcoder_metacmd_ID_open_long_braces = 121;
static int32_t fcoder_metacmd_ID_open_long_braces_break = 122;
static int32_t fcoder_metacmd_ID_open_long_braces_semicolon = 123;
static int32_t fcoder_metacmd_ID_open_matching_file_cpp = 124;
static int32_t fcoder_metacmd_ID_open_panel_hsplit = 125;
static int32_t fcoder_metacmd_ID_open_panel_vsplit = 126;
static int32_t fcoder_metacmd_ID_page_down = 127;
static int32_t fcoder_metacmd_ID_page_up = 128;
static int32_t fcoder_metacmd_ID_paste = 129;
static int32_t fcoder_metacmd_ID_paste_and_indent = 130;
static int32_t fcoder_metacmd_ID_paste_next = 131;
static int32_t fcoder_metacmd_ID_paste_next_and_indent = 132;
static int32_t fcoder_metacmd_ID_place_in_scope = 133;
static int32_t fcoder_metacmd_ID_project_command_lister = 134;
static int32_t fcoder_metacmd_ID_project_fkey_command = 135;
static int32_t fcoder_metacmd_ID_project_go_to_root_directory = 136;
static int32_t fcoder_metacmd_ID_query_replace = 137;
static int32_t fcoder_metacmd_ID_query_replace_identifier = 138;
static int32_t fcoder_metacmd_ID_query_replace_selection = 139;
static int32_t fcoder_metacmd_ID_redo = 140;
static int32_t fcoder_metacmd_ID_reload_themes = 141;
static int32_t fcoder_metacmd_ID_remap_interactive = 142;
static int32_t fcoder_metacmd_ID_rename_file_query = 143;
static int32_t fcoder_metacmd_ID_reopen = 144;
static int32_t fcoder_metacmd_ID_replace_in_range = 145;
static int32_t fcoder_metacmd_ID_reverse_search = 146;
static int32_t fcoder_metacmd_ID_reverse_search_identifier = 147;
static int32_t fcoder_metacmd_ID_save = 148;
static int32_t fcoder_metacmd_ID_save_all_dirty_buffers = 149;
static int32_t fcoder_metacmd_ID_save_to_query = 150;
static int32_t fcoder_metacmd_ID_scope_absorb_down = 151;
static int32_t fcoder_metacmd_ID_search = 152;
static int32_t fcoder_metacmd_ID_search_identifier = 153;
static int32_t fcoder_metacmd_ID_seek_alphanumeric_left = 154;
static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_left = 155;
static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_right = 156;
static int32_t fcoder_metacmd_ID_seek_alphanumeric_right = 157;
static int32_t fcoder_metacmd_ID_seek_beginning_of_line = 158;
static int32_t fcoder_metacmd_ID_seek_beginning_of_textual_line = 159;
static int32_t fcoder_metacmd_ID_seek_end_of_line = 160;
static int32_t fcoder_metacmd_ID_seek_end_of_textual_line = 161;
static int32_t fcoder_metacmd_ID_seek_token_left = 162;
static int32_t fcoder_metacmd_ID_seek_token_right = 163;
static int32_t fcoder_metacmd_ID_seek_white_or_token_left = 164;
static int32_t fcoder_metacmd_ID_seek_white_or_token_right = 165;
static int32_t fcoder_metacmd_ID_seek_whitespace_down = 166;
static int32_t fcoder_metacmd_ID_seek_whitespace_down_end_line = 167;
static int32_t fcoder_metacmd_ID_seek_whitespace_left = 168;
static int32_t fcoder_metacmd_ID_seek_whitespace_right = 169;
static int32_t fcoder_metacmd_ID_seek_whitespace_up = 170;
static int32_t fcoder_metacmd_ID_seek_whitespace_up_end_line = 171;
static int32_t fcoder_metacmd_ID_select_all = 172;
static int32_t fcoder_metacmd_ID_select_next_scope_absolute = 173;
static int32_t fcoder_metacmd_ID_select_prev_scope_absolute = 174;
static int32_t fcoder_metacmd_ID_select_surrounding_scope = 175;
static int32_t fcoder_metacmd_ID_set_bindings_choose = 176;
static int32_t fcoder_metacmd_ID_set_bindings_default = 177;
static int32_t fcoder_metacmd_ID_set_bindings_mac_default = 178;

View File

@ -142,9 +142,9 @@ bind(context, 'T', MDFR_ALT, list_all_locations_of_type_definition_of_identifier
bind(context, '[', MDFR_CTRL, open_long_braces);
bind(context, '{', MDFR_CTRL, open_long_braces_semicolon);
bind(context, '}', MDFR_CTRL, open_long_braces_break);
bind(context, '[', MDFR_ALT, highlight_surrounding_scope);
bind(context, ']', MDFR_ALT, highlight_prev_scope_absolute);
bind(context, '\'', MDFR_ALT, highlight_next_scope_absolute);
bind(context, '[', MDFR_ALT, select_surrounding_scope);
bind(context, ']', MDFR_ALT, select_prev_scope_absolute);
bind(context, '\'', MDFR_ALT, select_next_scope_absolute);
bind(context, '/', MDFR_ALT, place_in_scope);
bind(context, '-', MDFR_ALT, delete_current_scope);
bind(context, 'j', MDFR_ALT, scope_absorb_down);
@ -187,7 +187,7 @@ bind(context, 'n', MDFR_CTRL, goto_next_jump_sticky);
bind(context, 'N', MDFR_CTRL, goto_prev_jump_sticky);
bind(context, 'M', MDFR_CTRL, goto_first_jump_sticky);
bind(context, 'm', MDFR_CTRL, build_in_build_panel);
bind(context, 'b', MDFR_ALT, toggle_filebar);
bind(context, 'b', MDFR_CTRL, toggle_filebar);
bind(context, 'z', MDFR_CTRL, execute_any_cli);
bind(context, 'Z', MDFR_CTRL, execute_previous_cli);
bind(context, 'x', MDFR_CTRL, command_lister);
@ -312,9 +312,9 @@ bind(context, 'T', MDFR_CTRL, list_all_locations_of_type_definition_of_identifie
bind(context, '[', MDFR_CMND, open_long_braces);
bind(context, '{', MDFR_CMND, open_long_braces_semicolon);
bind(context, '}', MDFR_CMND, open_long_braces_break);
bind(context, '[', MDFR_CTRL, highlight_surrounding_scope);
bind(context, ']', MDFR_CTRL, highlight_prev_scope_absolute);
bind(context, '\'', MDFR_CTRL, highlight_next_scope_absolute);
bind(context, '[', MDFR_CTRL, select_surrounding_scope);
bind(context, ']', MDFR_CTRL, select_prev_scope_absolute);
bind(context, '\'', MDFR_CTRL, select_next_scope_absolute);
bind(context, '/', MDFR_CTRL, place_in_scope);
bind(context, '-', MDFR_CTRL, delete_current_scope);
bind(context, 'j', MDFR_CTRL, scope_absorb_down);
@ -514,9 +514,9 @@ static Meta_Key_Bind fcoder_binds_for_default_default_code_map[31] = {
{0, 91, 1, "open_long_braces", 16, LINK_PROCS(open_long_braces)},
{0, 123, 1, "open_long_braces_semicolon", 26, LINK_PROCS(open_long_braces_semicolon)},
{0, 125, 1, "open_long_braces_break", 22, LINK_PROCS(open_long_braces_break)},
{0, 91, 2, "highlight_surrounding_scope", 27, LINK_PROCS(highlight_surrounding_scope)},
{0, 93, 2, "highlight_prev_scope_absolute", 29, LINK_PROCS(highlight_prev_scope_absolute)},
{0, 39, 2, "highlight_next_scope_absolute", 29, LINK_PROCS(highlight_next_scope_absolute)},
{0, 91, 2, "select_surrounding_scope", 24, LINK_PROCS(select_surrounding_scope)},
{0, 93, 2, "select_prev_scope_absolute", 26, LINK_PROCS(select_prev_scope_absolute)},
{0, 39, 2, "select_next_scope_absolute", 26, LINK_PROCS(select_next_scope_absolute)},
{0, 47, 2, "place_in_scope", 14, LINK_PROCS(place_in_scope)},
{0, 45, 2, "delete_current_scope", 20, LINK_PROCS(delete_current_scope)},
{0, 106, 2, "scope_absorb_down", 17, LINK_PROCS(scope_absorb_down)},
@ -563,7 +563,7 @@ static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_global[38] = {
{0, 78, 1, "goto_prev_jump_sticky", 21, LINK_PROCS(goto_prev_jump_sticky)},
{0, 77, 1, "goto_first_jump_sticky", 22, LINK_PROCS(goto_first_jump_sticky)},
{0, 109, 1, "build_in_build_panel", 20, LINK_PROCS(build_in_build_panel)},
{0, 98, 2, "toggle_filebar", 14, LINK_PROCS(toggle_filebar)},
{0, 98, 1, "toggle_filebar", 14, LINK_PROCS(toggle_filebar)},
{0, 122, 1, "execute_any_cli", 15, LINK_PROCS(execute_any_cli)},
{0, 90, 1, "execute_previous_cli", 20, LINK_PROCS(execute_previous_cli)},
{0, 120, 1, "command_lister", 14, LINK_PROCS(command_lister)},
@ -687,9 +687,9 @@ static Meta_Key_Bind fcoder_binds_for_mac_default_default_code_map[31] = {
{0, 91, 4, "open_long_braces", 16, LINK_PROCS(open_long_braces)},
{0, 123, 4, "open_long_braces_semicolon", 26, LINK_PROCS(open_long_braces_semicolon)},
{0, 125, 4, "open_long_braces_break", 22, LINK_PROCS(open_long_braces_break)},
{0, 91, 1, "highlight_surrounding_scope", 27, LINK_PROCS(highlight_surrounding_scope)},
{0, 93, 1, "highlight_prev_scope_absolute", 29, LINK_PROCS(highlight_prev_scope_absolute)},
{0, 39, 1, "highlight_next_scope_absolute", 29, LINK_PROCS(highlight_next_scope_absolute)},
{0, 91, 1, "select_surrounding_scope", 24, LINK_PROCS(select_surrounding_scope)},
{0, 93, 1, "select_prev_scope_absolute", 26, LINK_PROCS(select_prev_scope_absolute)},
{0, 39, 1, "select_next_scope_absolute", 26, LINK_PROCS(select_next_scope_absolute)},
{0, 47, 1, "place_in_scope", 14, LINK_PROCS(place_in_scope)},
{0, 45, 1, "delete_current_scope", 20, LINK_PROCS(delete_current_scope)},
{0, 106, 1, "scope_absorb_down", 17, LINK_PROCS(scope_absorb_down)},

View File

@ -1,4 +1,3 @@
// For a quick way to extend the default keywords:
// #define FCPP_LEXER_EXTRA_KEYWORDS "my_keywords.h"
// And in the file "my_keywords.h", list the keywords you want.

View File

@ -1,4 +1,3 @@
// TOP
#ifndef FCPP_LEXER_TYPES_INC

View File

@ -382,7 +382,7 @@ view_set_to_region(Application_Links *app, View_Summary *view, int32_t major_pos
}
}
CUSTOM_COMMAND_SIG(highlight_surrounding_scope)
CUSTOM_COMMAND_SIG(select_surrounding_scope)
CUSTOM_DOC("Finds the scope enclosed by '{' '}' surrounding the cursor and puts the cursor and mark on the '{' and '}'.")
{
uint32_t access = AccessProtected;
@ -394,10 +394,11 @@ CUSTOM_DOC("Finds the scope enclosed by '{' '}' surrounding the cursor and puts
view_set_cursor(app, &view, seek_pos(range.first), true);
view_set_mark(app, &view, seek_pos(range.end));
view_set_to_region(app, &view, range.first, range.end, scope_center_threshold);
no_mark_snap_to_cursor(app, view.view_id);
}
}
CUSTOM_COMMAND_SIG(highlight_next_scope_absolute)
CUSTOM_COMMAND_SIG(select_next_scope_absolute)
CUSTOM_DOC("Finds the first scope started by '{' after the cursor and puts the cursor and mark on the '{' and '}'.")
{
uint32_t access = AccessProtected;
@ -412,11 +413,12 @@ CUSTOM_DOC("Finds the first scope started by '{' after the cursor and puts the c
view_set_cursor(app, &view, seek_pos(top), true);
view_set_mark(app, &view, seek_pos(bottom));
view_set_to_region(app, &view, top, bottom, scope_center_threshold);
no_mark_snap_to_cursor(app, view.view_id);
}
}
}
CUSTOM_COMMAND_SIG(highlight_prev_scope_absolute)
CUSTOM_COMMAND_SIG(select_prev_scope_absolute)
CUSTOM_DOC("Finds the first scope started by '{' before the cursor and puts the cursor and mark on the '{' and '}'.")
{
uint32_t access = AccessProtected;
@ -430,6 +432,7 @@ CUSTOM_DOC("Finds the first scope started by '{' before the cursor and puts the
view_set_cursor(app, &view, seek_pos(top), true);
view_set_mark(app, &view, seek_pos(bottom));
view_set_to_region(app, &view, top, bottom, scope_center_threshold);
no_mark_snap_to_cursor(app, view.view_id);
}
}
}
@ -791,7 +794,7 @@ CUSTOM_DOC("If a scope is currently selected, and a statement or block statement
Temp_Memory temp = begin_temp_memory(part);
if (buffer_get_char(app, &buffer, top) == '{' && buffer_get_char(app, &buffer, bottom-1) == '}'){
Range range;
Range range = {0};
if (find_whole_statement_down(app, &buffer, bottom, &range.start, &range.end)){
char *string_space = push_array(part, char, range.end - range.start);
buffer_read_range(app, &buffer, range.start, range.end, string_space);
@ -842,6 +845,8 @@ CUSTOM_DOC("If a scope is currently selected, and a statement or block statement
}
}
end_temp_memory(temp);
no_mark_snap_to_cursor(app, view.view_id);
}
// BOTTOM

View File

@ -1,6 +1,3 @@
/*
New File
*/
// TOP

View File

@ -275,22 +275,23 @@ lister_update_ui(Application_Links *app, Partition *scratch, View_Summary *view,
Lister_Node_Ptr_Array substring_matches = {0};
substring_matches.node_ptrs = push_array(scratch, Lister_Node*, node_count);
String key = state->lister.key_string;
Absolutes absolutes = {0};
get_absolutes(state->lister.key_string, &absolutes, true, true);
get_absolutes(key, &absolutes, true, true);
bool32 has_wildcard = (absolutes.count > 3);
for (Lister_Node *node = state->lister.options.first;
node != 0;
node = node->next){
if (state->lister.key_string.size == 0 ||
if (key.size == 0 ||
wildcard_match_s(&absolutes, node->string, false)){
bool32 has_wildcard = (absolutes.count > 2);
if (match_insensitive(node->string, state->lister.key_string) && exact_matches.count == 0){
if (match_insensitive(node->string, key) && exact_matches.count == 0){
exact_matches.node_ptrs[exact_matches.count++] = node;
}
else if (!has_wildcard &&
match_part_insensitive(node->string, state->lister.key_string) &&
node->string.size > state->lister.key_string.size &&
node->string.str[state->lister.key_string.size] == '.'){
match_part_insensitive(node->string, key) &&
node->string.size > key.size &&
node->string.str[key.size] == '.'){
before_extension_matches.node_ptrs[before_extension_matches.count++] = node;
}
else{

View File

@ -153,6 +153,7 @@ file_cursor_to_end(System_Functions *system, Models *models, Editing_File *file)
continue;
}
view_cursor_move(system, view, pos);
view->transient.edit_pos->mark = view->transient.edit_pos->cursor.pos;
}
}

View File

@ -1212,6 +1212,7 @@ DOC_SEE(Buffer_Create_Flag)
Partition *part = &models->mem.part;
Buffer_Summary result = {0};
b32 buffer_is_for_new_file = false;
if (filename_len > 0){
Temp_Memory temp = begin_temp_memory(part);
@ -1257,6 +1258,9 @@ DOC_SEE(Buffer_Create_Flag)
}
if (do_empty_buffer){
if (has_canon_name){
buffer_is_for_new_file = true;
}
if ((flags & BufferCreate_NeverNew) == 0){
file = working_set_alloc_always(working_set, heap, &models->lifetime_allocator);
if (file != 0){
@ -1313,6 +1317,16 @@ DOC_SEE(Buffer_Create_Flag)
i32 size = buffer_size(&file->state.buffer);
if (size > 0){
edit_single(system, models, file, 0, size, 0, 0);
if (has_canon_name){
buffer_is_for_new_file = true;
}
}
}
if (file != 0 && buffer_is_for_new_file &&
(flags & BufferCreate_SuppressNewFileHook) == 0){
if (models->hook_new_file != 0){
models->hook_new_file(&models->app_links, file->id.id);
}
}

View File

@ -1008,7 +1008,6 @@ render_loaded_file_in_view__inner(Models *models, Render_Target *target, View *v
// NOTE(allen): Visual marker colors
i32 marker_highlight_best_priority = min_i32;
b32 marker_highlight_is_set = false;
u32 marker_highlight = 0;
u32 marker_highlight_text = 0;
@ -1026,7 +1025,6 @@ render_loaded_file_in_view__inner(Models *models, Render_Target *target, View *v
case VisualType_CharacterBlocks:
{
if (marker->priority > marker_highlight_best_priority){
marker_highlight_is_set = true;
marker_highlight = marker->color;
marker_highlight_text = marker->text_color;
marker_highlight_best_priority = marker->priority;
@ -1075,7 +1073,8 @@ render_loaded_file_in_view__inner(Models *models, Render_Target *target, View *v
}
for (;range_stack_top >= 0 && ind >= range_stack[range_stack_top].one_past_last;
range_stack_top -= 1);
if (!marker_highlight_is_set && range_stack_top >= 0){
if (range_stack_top >= 0 &&
range_stack[range_stack_top].priority > marker_highlight_best_priority){
marker_highlight = range_stack[range_stack_top].color;
marker_highlight_text = range_stack[range_stack_top].text_color;
}

View File

@ -1,4 +1,3 @@
Thank you for contributing to the 4coder project!
To submit bug reports or to request particular features email:

View File

@ -1,4 +1,3 @@
New in alpha 4.0.28:
-In config.4coder "eanble_virtual_whitespace" is now separate from "enable_code_wrapping"
-In project.4coder .os = "all" now matches for all operating systems

View File

@ -861,9 +861,9 @@ generate_remapping_code_and_data(){
bind(mappings, '{', MDFR_CTRL, open_long_braces_semicolon);
bind(mappings, '}', MDFR_CTRL, open_long_braces_break);
bind(mappings, '[', MDFR_ALT, highlight_surrounding_scope);
bind(mappings, ']', MDFR_ALT, highlight_prev_scope_absolute);
bind(mappings, '\'', MDFR_ALT, highlight_next_scope_absolute);
bind(mappings, '[', MDFR_ALT, select_surrounding_scope);
bind(mappings, ']', MDFR_ALT, select_prev_scope_absolute);
bind(mappings, '\'', MDFR_ALT, select_next_scope_absolute);
bind(mappings, '/', MDFR_ALT, place_in_scope);
bind(mappings, '-', MDFR_ALT, delete_current_scope);
bind(mappings, 'j', MDFR_ALT, scope_absorb_down);
@ -921,7 +921,7 @@ generate_remapping_code_and_data(){
bind(mappings, 'N', MDFR_CTRL, goto_prev_jump_sticky);
bind(mappings, 'M', MDFR_CTRL, goto_first_jump_sticky);
bind(mappings, 'm', MDFR_CTRL, build_in_build_panel);
bind(mappings, 'b', MDFR_ALT, toggle_filebar);
bind(mappings, 'b', MDFR_CTRL, toggle_filebar);
bind(mappings, 'z', MDFR_CTRL, execute_any_cli);
bind(mappings, 'Z', MDFR_CTRL, execute_previous_cli);
@ -1079,9 +1079,9 @@ generate_remapping_code_and_data(){
bind(mappings, '{', MDFR_CMND, open_long_braces_semicolon);
bind(mappings, '}', MDFR_CMND, open_long_braces_break);
bind(mappings, '[', MDFR_CTRL, highlight_surrounding_scope);
bind(mappings, ']', MDFR_CTRL, highlight_prev_scope_absolute);
bind(mappings, '\'', MDFR_CTRL, highlight_next_scope_absolute);
bind(mappings, '[', MDFR_CTRL, select_surrounding_scope);
bind(mappings, ']', MDFR_CTRL, select_prev_scope_absolute);
bind(mappings, '\'', MDFR_CTRL, select_next_scope_absolute);
bind(mappings, '/', MDFR_CTRL, place_in_scope);
bind(mappings, '-', MDFR_CTRL, delete_current_scope);
bind(mappings, 'j', MDFR_CTRL, scope_absorb_down);

View File

@ -13,36 +13,36 @@
#define OUTPUT_FILE "linux_icon.h"
int main(void){
FILE* f = fopen(OUTPUT_FILE, "w");
fputs("/* Generated by gen_linux_icon.c */\n", f);
int w = gimp_image.width, h = gimp_image.height;
fprintf(f, "static const unsigned long linux_icon[] = {\n %d, %d,", w, h);
const unsigned char* p = gimp_image.pixel_data;
int i;
for(i = 0; i < (w*h); ++i){
if((i % 6) == 0){
fputs("\n ", f);
}
unsigned int pixel = 0;
pixel |= *p++ << 16L;
pixel |= *p++ << 8L;
pixel |= *p++;
pixel |= *p++ << 24L;
fprintf(f, " 0x%08x,", pixel);
}
fputs("\n};\n", f);
fclose(f);
puts("Generated linux icon in " OUTPUT_FILE);
}

View File

@ -5,8 +5,8 @@
// to run on older distros without glibc >= 2.14
extern "C" {
asm (".symver memcpy, memcpy@GLIBC_2.2.5");
void *__wrap_memcpy(void *dest, const void *src, size_t n){
return memcpy(dest, src, n);
}
asm (".symver memcpy, memcpy@GLIBC_2.2.5");
void *__wrap_memcpy(void *dest, const void *src, size_t n){
return memcpy(dest, src, n);
}
}

View File

@ -1,4 +1,3 @@
\INCLUDE{site_header.txt}
4coder version \VERSION

View File

@ -1,4 +1,3 @@
\INCLUDE{site_header.txt}
\TABLE_OF_CONTENTS

View File

@ -1,4 +1,3 @@
\INCLUDE{site_header.txt}
This page provides a list of 4coder features for anyone trying to determine whether 4coder is the right editor for them. To find a complete list of every default key binding visit \LINK{document:bindings} binding list \END. If a feature is missing here you should check out the \LINK{document:roadmap} roadmap \END page to see what is coming in the future. If the feature you want is on neither, it might be missing from this list, or it might actually be missing from 4coder, you should contact \STYLE{code} editor@4coder.net \END to ask questions and make requests.

View File

@ -1,4 +1,3 @@
\INCLUDE{site_header.txt}
4coder is a code editor that lives in a space between an IDE and a power editor such as Emacs or Vim. It targets maximum ease of customization, extension, and cross platform reliability. Earlier versions of 4coder focused entirely on C/C++ but it is now transitioning to be a more general purpose editor. Here you can learn about the features of 4coder, how to get started with 4coder, and how to get the absolute most out of 4coder.

View File

@ -1,4 +1,3 @@
This is the documentation for \VERSION. The documentation is still under construction so some of the links are linking to sections that have not been written yet. What is here should be correct and I suspect useful even without some of the other sections.
If you have questions or discover errors please contact \STYLE{code}editor@4coder.net\END or to get help from members of the 4coder and handmade network community you can post on the 4coder forums hosted at \STYLE{code}4coder.handmade.network\END.

View File

@ -1,4 +1,3 @@
The 4cpp lexer system provides a polished, fast, flexible system that takes in C/C++ and outputs a tokenization of the text data. There are two API levels. One level is setup to let you easily get a tokenization of the file. This level manages memory for you with malloc to make it as fast as possible to start getting your tokens. The second level enables deep integration by allowing control over allocation, data chunking, and output rate control.
To use the quick setup API you simply include 4cpp_lexer.h and read the documentation at \DOC_LINK{cpp_lex_file}.

View File

@ -1,4 +1,3 @@
\INCLUDE{site_header.txt}
Right now I am working on upgrading some core internal systems that should buy me the flexibility I need to get the rest of the envisioned features done. Because these core upgrades are experimental in nature, it's hard to predict how long it will take before they are ready.

View File

@ -1,4 +1,3 @@
\META_PARSE{custom_funcs}{4ed_api_implementation.cpp}
\META_PARSE{custom_types}{4coder_API/types.h}
\META_PARSE{string} {string/internal_4coder_string.cpp}

View File

@ -1,4 +1,3 @@
\INCLUDE{site_header.txt}
Getting started with 4coder and navigating your files:

View File

@ -1,4 +1,3 @@
[] Build 4.0.29
{
Features
@ -8,7 +7,12 @@
Bugs
{
[] Before '.' name matches don't sort to the top like they're supposed to.
[x] Before '.' name matches don't sort to the top like they're supposed to.
[x] notepad like mode - select scope range snap shouldn't happen
[x] highlight high priority vs block low priority should win
[x] new files don't get their automatically inserted comments anymore
[x] nodepad like mode - when moving the cursor in a non-active view, there is no marker snap
[x] notepad like mode - can't tell which view is active, only highlight line in active view?
Repro Needed
{
}
@ -40,10 +44,10 @@
[x] alloc_managed_memory_in_scope
[x] alloc_buffer_markers_on_buffer
[x] create_marker_visuals
[x] marker_visuals_set_look
[x] marker_visuals_set_take_rule
[x] marker_visuals_set_priority
[x] marker_visuals_set_view_key
[] marker_visuals_set_look
[] marker_visuals_set_take_rule
[] marker_visuals_set_priority
[] marker_visuals_set_view_key
[] destroy_marker_visuals
[] buffer_markers_get_attached_visuals_count
[] buffer_markers_get_attached_visuals
@ -92,6 +96,11 @@
Bugs
{
[] Texture binding changes too often problem.
Repro Needed
{
[] pasting long comment at top of code files doesn't always parse right away???
[] saving to removable media -> Ask person who sent it in for more info
}
}
}