From a1cfefbf8626624227db10e269066c04b471d134 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Sun, 16 Dec 2018 20:31:04 -0800 Subject: [PATCH] Fixes: scope highlight scrolled right, ignore render items off the screen, scientific notation parsing with + --- 4coder_API/4coder_types.h | 3 + 4coder_base_commands.cpp | 17 ++ 4coder_generated/app_functions.h | 9 +- 4coder_generated/command_metadata.h | 313 +++++++++++----------- 4coder_generated/remapping.h | 12 +- 4coder_lib/4cpp_lexer_tables.c | 18 +- 4coder_ui_helper.cpp | 4 + 4ed.cpp | 2 + 4ed.h | 1 + 4ed_api_implementation.cpp | 12 + 4ed_buffer.cpp | 102 ++++--- 4ed_buffer.h | 9 +- 4ed_render_format.cpp | 1 + 4ed_view.cpp | 356 +++++++++++++------------ meta/4ed_fsm_table_generator.cpp | 2 +- meta/4ed_metagen.cpp | 2 + platform_all/4ed_shared_init_logic.cpp | 6 +- platform_win32/win32_4ed.cpp | 27 +- platform_win32/win32_4ed_functions.cpp | 10 - todo.txt | 27 +- 20 files changed, 506 insertions(+), 427 deletions(-) diff --git a/4coder_API/4coder_types.h b/4coder_API/4coder_types.h index e00f00c9..0f317565 100644 --- a/4coder_API/4coder_types.h +++ b/4coder_API/4coder_types.h @@ -429,6 +429,9 @@ STRUCT Parser_String_And_Type{ uint32_t type; }; +/* DOC(Microsecond_Time_Stamp is a typedef of an unsigned 64 bit integer used to signify that the value is an arbitrary for a moment in time.) */ +TYPEDEF uint64_t Microsecond_Time_Stamp; + /* DOC(File_Info describes the name and type of a file.) DOC_SEE(File_List) diff --git a/4coder_base_commands.cpp b/4coder_base_commands.cpp index 29fff524..69e45905 100644 --- a/4coder_base_commands.cpp +++ b/4coder_base_commands.cpp @@ -583,6 +583,23 @@ CUSTOM_DOC("Decrease the size of the face used by the current buffer.") try_modify_face(app, face_id, &description); } +CUSTOM_COMMAND_SIG(mouse_wheel_change_face_size) +CUSTOM_DOC("Reads the state of the mouse wheel and uses it to either increase or decrease the face size.") +{ + static Microsecond_Time_Stamp next_resize_time = 0; + Microsecond_Time_Stamp now = get_microseconds_timestamp(app); + if (now >= next_resize_time){ + next_resize_time = now + 50*1000; + Mouse_State mouse = get_mouse_state(app); + if (mouse.wheel > 0){ + decrease_face_size(app); + } + else if (mouse.wheel < 0){ + increase_face_size(app); + } + } +} + CUSTOM_COMMAND_SIG(toggle_virtual_whitespace) CUSTOM_DOC("Toggles the current buffer's virtual whitespace status.") { diff --git a/4coder_generated/app_functions.h b/4coder_generated/app_functions.h index 947004f7..0cb3abc5 100644 --- a/4coder_generated/app_functions.h +++ b/4coder_generated/app_functions.h @@ -118,6 +118,7 @@ struct Application_Links; #define IS_FULLSCREEN_SIG(n) bool32 n(Application_Links *app) #define SEND_EXIT_SIGNAL_SIG(n) void n(Application_Links *app) #define SET_WINDOW_TITLE_SIG(n) void n(Application_Links *app, char *title) +#define GET_MICROSECONDS_TIMESTAMP_SIG(n) Microsecond_Time_Stamp n(Application_Links *app) typedef GLOBAL_SET_SETTING_SIG(Global_Set_Setting_Function); typedef GLOBAL_SET_MAPPING_SIG(Global_Set_Mapping_Function); typedef EXEC_COMMAND_SIG(Exec_Command_Function); @@ -237,6 +238,7 @@ typedef SET_FULLSCREEN_SIG(Set_Fullscreen_Function); typedef IS_FULLSCREEN_SIG(Is_Fullscreen_Function); typedef SEND_EXIT_SIGNAL_SIG(Send_Exit_Signal_Function); typedef SET_WINDOW_TITLE_SIG(Set_Window_Title_Function); +typedef GET_MICROSECONDS_TIMESTAMP_SIG(Get_Microseconds_Timestamp_Function); struct Application_Links{ #if defined(ALLOW_DEP_4CODER) Global_Set_Setting_Function *global_set_setting; @@ -358,6 +360,7 @@ Set_Fullscreen_Function *set_fullscreen; Is_Fullscreen_Function *is_fullscreen; Send_Exit_Signal_Function *send_exit_signal; Set_Window_Title_Function *set_window_title; +Get_Microseconds_Timestamp_Function *get_microseconds_timestamp; #else Global_Set_Setting_Function *global_set_setting_; Global_Set_Mapping_Function *global_set_mapping_; @@ -478,6 +481,7 @@ Set_Fullscreen_Function *set_fullscreen_; Is_Fullscreen_Function *is_fullscreen_; Send_Exit_Signal_Function *send_exit_signal_; Set_Window_Title_Function *set_window_title_; +Get_Microseconds_Timestamp_Function *get_microseconds_timestamp_; #endif void *memory; int32_t memory_size; @@ -605,7 +609,8 @@ app_links->show_mouse_cursor_ = Show_Mouse_Cursor;\ app_links->set_fullscreen_ = Set_Fullscreen;\ app_links->is_fullscreen_ = Is_Fullscreen;\ app_links->send_exit_signal_ = Send_Exit_Signal;\ -app_links->set_window_title_ = Set_Window_Title;} while(false) +app_links->set_window_title_ = Set_Window_Title;\ +app_links->get_microseconds_timestamp_ = Get_Microseconds_Timestamp;} while(false) #if defined(ALLOW_DEP_4CODER) static inline bool32 global_set_setting(Application_Links *app, Global_Setting_ID setting, int32_t value){return(app->global_set_setting(app, setting, value));} static inline bool32 global_set_mapping(Application_Links *app, void *data, int32_t size){return(app->global_set_mapping(app, data, size));} @@ -726,6 +731,7 @@ static inline bool32 set_fullscreen(Application_Links *app, bool32 full_screen){ static inline bool32 is_fullscreen(Application_Links *app){return(app->is_fullscreen(app));} static inline void send_exit_signal(Application_Links *app){(app->send_exit_signal(app));} static inline void set_window_title(Application_Links *app, char *title){(app->set_window_title(app, title));} +static inline Microsecond_Time_Stamp get_microseconds_timestamp(Application_Links *app){return(app->get_microseconds_timestamp(app));} #else static inline bool32 global_set_setting(Application_Links *app, Global_Setting_ID setting, int32_t value){return(app->global_set_setting_(app, setting, value));} static inline bool32 global_set_mapping(Application_Links *app, void *data, int32_t size){return(app->global_set_mapping_(app, data, size));} @@ -846,4 +852,5 @@ static inline bool32 set_fullscreen(Application_Links *app, bool32 full_screen){ static inline bool32 is_fullscreen(Application_Links *app){return(app->is_fullscreen_(app));} static inline void send_exit_signal(Application_Links *app){(app->send_exit_signal_(app));} static inline void set_window_title(Application_Links *app, char *title){(app->set_window_title_(app, title));} +static inline Microsecond_Time_Stamp get_microseconds_timestamp(Application_Links *app){return(app->get_microseconds_timestamp_(app));} #endif diff --git a/4coder_generated/command_metadata.h b/4coder_generated/command_metadata.h index 5be7a3a0..57034c82 100644 --- a/4coder_generated/command_metadata.h +++ b/4coder_generated/command_metadata.h @@ -2,7 +2,7 @@ #define command_id(c) (fcoder_metacmd_ID_##c) #define command_metadata(c) (&fcoder_metacmd_table[command_id(c)]) #define command_metadata_by_id(id) (&fcoder_metacmd_table[id]) -#define command_one_past_last_id 228 +#define command_one_past_last_id 229 #if defined(CUSTOM_COMMAND_SIG) #define PROC_LINKS(x,y) x #else @@ -118,6 +118,7 @@ CUSTOM_COMMAND_SIG(miblo_decrement_time_stamp_minute); CUSTOM_COMMAND_SIG(miblo_increment_basic); CUSTOM_COMMAND_SIG(miblo_increment_time_stamp); CUSTOM_COMMAND_SIG(miblo_increment_time_stamp_minute); +CUSTOM_COMMAND_SIG(mouse_wheel_change_face_size); CUSTOM_COMMAND_SIG(mouse_wheel_scroll); CUSTOM_COMMAND_SIG(move_down); CUSTOM_COMMAND_SIG(move_down_10); @@ -248,7 +249,7 @@ char *source_name; int32_t source_name_len; int32_t line_number; }; -static Command_Metadata fcoder_metacmd_table[228] = { +static Command_Metadata fcoder_metacmd_table[229] = { { PROC_LINKS(allow_mouse, 0), "allow_mouse", 11, "Shows the mouse and causes all mouse input to be processed normally.", 68, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 240 }, { PROC_LINKS(auto_tab_line_at_cursor, 0), "auto_tab_line_at_cursor", 23, "Auto-indents the line on which the cursor sits.", 47, "w:\\4ed\\code\\4coder_auto_indent.cpp", 34, 722 }, { PROC_LINKS(auto_tab_range, 0), "auto_tab_range", 14, "Auto-indents the range between the cursor and the mark.", 55, "w:\\4ed\\code\\4coder_auto_indent.cpp", 34, 733 }, @@ -278,16 +279,16 @@ static Command_Metadata fcoder_metacmd_table[228] = { { 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, 551 }, { 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, 51 }, { 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, 1118 }, -{ 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, 1370 }, +{ 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, 1135 }, +{ 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, 1387 }, { 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, 106 }, { PROC_LINKS(delete_word, 0), "delete_word", 11, "Delete characters between the cursor position and the first alphanumeric boundary to the right.", 95, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1264 }, -{ PROC_LINKS(duplicate_line, 0), "duplicate_line", 14, "Create a copy of the line on which the cursor sits.", 51, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1348 }, -{ PROC_LINKS(eol_dosify, 0), "eol_dosify", 10, "Puts the buffer in DOS line ending mode.", 40, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 604 }, -{ PROC_LINKS(eol_nixify, 0), "eol_nixify", 10, "Puts the buffer in NIX line ending mode.", 40, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 612 }, +{ PROC_LINKS(duplicate_line, 0), "duplicate_line", 14, "Create a copy of the line on which the cursor sits.", 51, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1365 }, +{ PROC_LINKS(eol_dosify, 0), "eol_dosify", 10, "Puts the buffer in DOS line ending mode.", 40, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 621 }, +{ PROC_LINKS(eol_nixify, 0), "eol_nixify", 10, "Puts the buffer in NIX line ending mode.", 40, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 629 }, { PROC_LINKS(execute_any_cli, 0), "execute_any_cli", 15, "Queries for an output buffer name and system command, runs the system command as a CLI and prints the output to the specified buffer.", 133, "w:\\4ed\\code\\4coder_system_command.cpp", 37, 23 }, { PROC_LINKS(execute_previous_cli, 0), "execute_previous_cli", 20, "If the command execute_any_cli has already been used, this will execute a CLI reusing the most recent buffer name and command.", 126, "w:\\4ed\\code\\4coder_system_command.cpp", 37, 7 }, -{ PROC_LINKS(exit_4coder, 0), "exit_4coder", 11, "Attempts to close 4coder.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 620 }, +{ PROC_LINKS(exit_4coder, 0), "exit_4coder", 11, "Attempts to close 4coder.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 637 }, { PROC_LINKS(goto_beginning_of_file, 0), "goto_beginning_of_file", 22, "Sets the cursor to the beginning of the file.", 45, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1177 }, { PROC_LINKS(goto_end_of_file, 0), "goto_end_of_file", 16, "Sets the cursor to the end of the file.", 39, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1185 }, { PROC_LINKS(goto_first_jump_direct, 0), "goto_first_jump_direct", 22, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 84 }, @@ -297,7 +298,7 @@ static Command_Metadata fcoder_metacmd_table[228] = { { PROC_LINKS(goto_jump_at_cursor_same_panel_direct, 0), "goto_jump_at_cursor_same_panel_direct", 37, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list..", 168, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 29 }, { PROC_LINKS(goto_jump_at_cursor_same_panel_sticky, 0), "goto_jump_at_cursor_same_panel_sticky", 37, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list.", 167, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 376 }, { PROC_LINKS(goto_jump_at_cursor_sticky, 0), "goto_jump_at_cursor_sticky", 26, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in another view and changes the active panel to the view containing the jump.", 187, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 348 }, -{ PROC_LINKS(goto_line, 0), "goto_line", 9, "Queries the user for a number, and jumps the cursor to the corresponding line.", 78, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 628 }, +{ PROC_LINKS(goto_line, 0), "goto_line", 9, "Queries the user for a number, and jumps the cursor to the corresponding line.", 78, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 645 }, { PROC_LINKS(goto_next_jump_direct, 0), "goto_next_jump_direct", 21, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 48 }, { PROC_LINKS(goto_next_jump_no_skips_direct, 0), "goto_next_jump_no_skips_direct", 30, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 66 }, { PROC_LINKS(goto_next_jump_no_skips_sticky, 0), "goto_next_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 501 }, @@ -316,7 +317,7 @@ static Command_Metadata fcoder_metacmd_table[228] = { { PROC_LINKS(interactive_open, 0), "interactive_open", 16, "Interactively opens a file.", 27, "w:\\4ed\\code\\4coder_lists.cpp", 28, 917 }, { PROC_LINKS(interactive_open_or_new, 0), "interactive_open_or_new", 23, "Interactively open a file out of the file system.", 49, "w:\\4ed\\code\\4coder_lists.cpp", 28, 855 }, { PROC_LINKS(interactive_switch_buffer, 0), "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "w:\\4ed\\code\\4coder_lists.cpp", 28, 765 }, -{ PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1540 }, +{ PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1557 }, { PROC_LINKS(kill_rect, 0), "kill_rect", 9, "Delete characters in a rectangular region. Range testing is done by unwrapped-xy coordinates.", 93, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 26 }, { PROC_LINKS(left_adjust_view, 0), "left_adjust_view", 16, "Sets the left size of the view near the x position of the cursor.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 133 }, { PROC_LINKS(list_all_functions_all_buffers, 0), "list_all_functions_all_buffers", 30, "Creates a jump list of lines from all buffers that appear to define or declare functions.", 89, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 343 }, @@ -351,20 +352,21 @@ static Command_Metadata fcoder_metacmd_table[228] = { { PROC_LINKS(lister__write_character__file_path, 0), "lister__write_character__file_path", 34, "A lister mode command that inserts a character into the text field of a file system list.", 89, "w:\\4ed\\code\\4coder_lists.cpp", 28, 193 }, { PROC_LINKS(lister__write_character__fixed_list, 0), "lister__write_character__fixed_list", 35, "A lister mode command that handles input for the fixed sure to kill list.", 73, "w:\\4ed\\code\\4coder_lists.cpp", 28, 253 }, { PROC_LINKS(load_project, 0), "load_project", 12, "Looks for a project.4coder file in the current directory and tries to load it. Looks in parent directories until a project file is found or there are no more parents.", 167, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1083 }, -{ PROC_LINKS(make_directory_query, 0), "make_directory_query", 20, "Queries the user for a name and creates a new directory with the given name.", 76, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1228 }, +{ PROC_LINKS(make_directory_query, 0), "make_directory_query", 20, "Queries the user for a name and creates a new directory with the given name.", 76, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1245 }, { PROC_LINKS(miblo_decrement_basic, 0), "miblo_decrement_basic", 21, "Decrement an integer under the cursor by one.", 45, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 110 }, { PROC_LINKS(miblo_decrement_time_stamp, 0), "miblo_decrement_time_stamp", 26, "Decrement a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 383 }, { PROC_LINKS(miblo_decrement_time_stamp_minute, 0), "miblo_decrement_time_stamp_minute", 33, "Decrement a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 395 }, { PROC_LINKS(miblo_increment_basic, 0), "miblo_increment_basic", 21, "Increment an integer under the cursor by one.", 45, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 94 }, { PROC_LINKS(miblo_increment_time_stamp, 0), "miblo_increment_time_stamp", 26, "Increment a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 377 }, { PROC_LINKS(miblo_increment_time_stamp_minute, 0), "miblo_increment_time_stamp_minute", 33, "Increment a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 389 }, +{ PROC_LINKS(mouse_wheel_change_face_size, 0), "mouse_wheel_change_face_size", 28, "Reads the state of the mouse wheel and uses it to either increase or decrease the face size.", 92, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 586 }, { PROC_LINKS(mouse_wheel_scroll, 0), "mouse_wheel_scroll", 18, "Reads the scroll wheel value from the mouse state and scrolls accordingly.", 74, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 226 }, { PROC_LINKS(move_down, 0), "move_down", 9, "Moves the cursor down one line.", 31, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 290 }, { PROC_LINKS(move_down_10, 0), "move_down_10", 12, "Moves the cursor down ten lines.", 32, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 302 }, { PROC_LINKS(move_down_textual, 0), "move_down_textual", 17, "Moves down to the next line of actual text, regardless of line wrapping.", 72, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 308 }, { PROC_LINKS(move_left, 0), "move_left", 9, "Moves the cursor one character to the left.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 339 }, -{ PROC_LINKS(move_line_down, 0), "move_line_down", 14, "Swaps the line under the cursor with the line below it, and moves the cursor down with it.", 90, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1325 }, -{ PROC_LINKS(move_line_up, 0), "move_line_up", 12, "Swaps the line under the cursor with the line above it, and moves the cursor up with it.", 88, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1261 }, +{ PROC_LINKS(move_line_down, 0), "move_line_down", 14, "Swaps the line under the cursor with the line below it, and moves the cursor down with it.", 90, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1342 }, +{ PROC_LINKS(move_line_up, 0), "move_line_up", 12, "Swaps the line under the cursor with the line above it, and moves the cursor up with it.", 88, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1278 }, { PROC_LINKS(move_right, 0), "move_right", 10, "Moves the cursor one character to the right.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 349 }, { PROC_LINKS(move_up, 0), "move_up", 7, "Moves the cursor up one line.", 29, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 284 }, { PROC_LINKS(move_up_10, 0), "move_up_10", 10, "Moves the cursor up ten lines.", 30, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 296 }, @@ -376,12 +378,12 @@ static Command_Metadata fcoder_metacmd_table[228] = { { PROC_LINKS(open_all_code, 0), "open_all_code", 13, "Open all code in the current directory. File types are determined by extensions. An extension is considered code based on the extensions specified in 4coder.config.", 164, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1067 }, { PROC_LINKS(open_all_code_recursive, 0), "open_all_code_recursive", 23, "Works as open_all_code but also runs in all subdirectories.", 59, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1074 }, { PROC_LINKS(open_color_tweaker, 0), "open_color_tweaker", 18, "Opens the 4coder theme selector list.", 37, "w:\\4ed\\code\\4coder_lists.cpp", 28, 933 }, -{ PROC_LINKS(open_file_in_quotes, 0), "open_file_in_quotes", 19, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file.", 94, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1447 }, -{ PROC_LINKS(open_in_other, 0), "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1602 }, +{ PROC_LINKS(open_file_in_quotes, 0), "open_file_in_quotes", 19, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file.", 94, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1464 }, +{ PROC_LINKS(open_in_other, 0), "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1619 }, { PROC_LINKS(open_long_braces, 0), "open_long_braces", 16, "At the cursor, insert a '{' and '}' separated by a blank line.", 62, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 57 }, { PROC_LINKS(open_long_braces_break, 0), "open_long_braces_break", 22, "At the cursor, insert a '{' and '}break;' separated by a blank line.", 68, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 73 }, { PROC_LINKS(open_long_braces_semicolon, 0), "open_long_braces_semicolon", 26, "At the cursor, insert a '{' and '};' separated by a blank line.", 63, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 65 }, -{ PROC_LINKS(open_matching_file_cpp, 0), "open_matching_file_cpp", 22, "If the current file is a *.cpp or *.h, attempts to open the corresponding *.h or *.cpp file in the other view.", 110, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1483 }, +{ PROC_LINKS(open_matching_file_cpp, 0), "open_matching_file_cpp", 22, "If the current file is a *.cpp or *.h, attempts to open the corresponding *.h or *.cpp file in the other view.", 110, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1500 }, { PROC_LINKS(open_panel_hsplit, 0), "open_panel_hsplit", 17, "Create a new panel by horizontally splitting the active panel.", 62, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 173 }, { PROC_LINKS(open_panel_vsplit, 0), "open_panel_vsplit", 17, "Create a new panel by vertically splitting the active panel.", 60, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 164 }, { PROC_LINKS(page_down, 0), "page_down", 9, "Scrolls the view down one view height and moves the cursor down one view height.", 80, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 328 }, @@ -394,25 +396,25 @@ static Command_Metadata fcoder_metacmd_table[228] = { { 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, 1527 }, { 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, 1113 }, -{ PROC_LINKS(query_replace, 0), "query_replace", 13, "Queries the user for two strings, and incrementally replaces every occurence of the first string with the second string.", 120, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1002 }, -{ PROC_LINKS(query_replace_identifier, 0), "query_replace_identifier", 24, "Queries the user for a string, and incrementally replace every occurence of the word or token found at the cursor with the specified string.", 140, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1026 }, -{ PROC_LINKS(query_replace_selection, 0), "query_replace_selection", 23, "Queries the user for a string, and incrementally replace every occurence of the string found in the selected range with the specified string.", 141, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1044 }, -{ PROC_LINKS(redo, 0), "redo", 4, "Advances forewards through the undo history.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1571 }, -{ PROC_LINKS(reload_themes, 0), "reload_themes", 13, "Loads all the theme files in the theme folder, replacing duplicates with the new theme data.", 92, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1579 }, +{ PROC_LINKS(query_replace, 0), "query_replace", 13, "Queries the user for two strings, and incrementally replaces every occurence of the first string with the second string.", 120, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1019 }, +{ PROC_LINKS(query_replace_identifier, 0), "query_replace_identifier", 24, "Queries the user for a string, and incrementally replace every occurence of the word or token found at the cursor with the specified string.", 140, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1043 }, +{ PROC_LINKS(query_replace_selection, 0), "query_replace_selection", 23, "Queries the user for a string, and incrementally replace every occurence of the string found in the selected range with the specified string.", 141, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1061 }, +{ PROC_LINKS(redo, 0), "redo", 4, "Advances forewards through the undo history.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1588 }, +{ PROC_LINKS(reload_themes, 0), "reload_themes", 13, "Loads all the theme files in the theme folder, replacing duplicates with the new theme data.", 92, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1596 }, { PROC_LINKS(remap_interactive, 0), "remap_interactive", 17, "Switch to a named key binding map.", 34, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 290 }, -{ PROC_LINKS(rename_file_query, 0), "rename_file_query", 17, "Queries the user for a new name and renames the file of the current buffer, altering the buffer's name too.", 107, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1184 }, +{ PROC_LINKS(rename_file_query, 0), "rename_file_query", 17, "Queries the user for a new name and renames the file of the current buffer, altering the buffer's name too.", 107, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1201 }, { PROC_LINKS(rename_parameter, 0), "rename_parameter", 16, "If the cursor is found to be on the name of a function parameter in the signature of a function definition, all occurences within the scope of the function will be replaced with a new provided string.", 200, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 383 }, -{ PROC_LINKS(reopen, 0), "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1555 }, +{ PROC_LINKS(reopen, 0), "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1572 }, { PROC_LINKS(replace_all_occurrences, 0), "replace_all_occurrences", 23, "Queries the user for two strings, and replaces all occurrences of the first string with the second string in all open buffers.", 126, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 778 }, -{ PROC_LINKS(replace_in_range, 0), "replace_in_range", 16, "Queries the user for two strings, and replaces all occurences of the first string in the range between the cursor and the mark with the second string.", 150, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 883 }, -{ PROC_LINKS(reverse_search, 0), "reverse_search", 14, "Begins an incremental search up through the current buffer for a user specified string.", 87, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 854 }, -{ PROC_LINKS(reverse_search_identifier, 0), "reverse_search_identifier", 25, "Begins an incremental search up through the current buffer for the word or token under the cursor.", 98, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 872 }, -{ PROC_LINKS(save, 0), "save", 4, "Saves the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1547 }, -{ 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, 1088 }, -{ 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, 1144 }, +{ PROC_LINKS(replace_in_range, 0), "replace_in_range", 16, "Queries the user for two strings, and replaces all occurences of the first string in the range between the cursor and the mark with the second string.", 150, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 900 }, +{ PROC_LINKS(reverse_search, 0), "reverse_search", 14, "Begins an incremental search up through the current buffer for a user specified string.", 87, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 871 }, +{ PROC_LINKS(reverse_search_identifier, 0), "reverse_search_identifier", 25, "Begins an incremental search up through the current buffer for the word or token under the cursor.", 98, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 889 }, +{ PROC_LINKS(save, 0), "save", 4, "Saves the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1564 }, +{ 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, 1105 }, +{ 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, 1161 }, { 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, 847 }, -{ 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, 861 }, +{ 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, 864 }, +{ 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, 878 }, { 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 }, { PROC_LINKS(seek_alphanumeric_or_camel_left, 0), "seek_alphanumeric_or_camel_left", 31, "Seek left for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 106, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1250 }, { PROC_LINKS(seek_alphanumeric_or_camel_right, 0), "seek_alphanumeric_or_camel_right", 32, "Seek right for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 107, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1244 }, @@ -451,7 +453,7 @@ static Command_Metadata fcoder_metacmd_table[228] = { { PROC_LINKS(snipe_token_or_word_right, 0), "snipe_token_or_word_right", 25, "Delete a single, whole token on or to the right of the cursor and post it to the clipboard.", 91, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1276 }, { PROC_LINKS(snippet_lister, 0), "snippet_lister", 14, "Opens a snippet lister for inserting whole pre-written snippets of text.", 72, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 191 }, { PROC_LINKS(suppress_mouse, 0), "suppress_mouse", 14, "Hides the mouse and causes all mosue input (clicks, position, wheel) to be ignored.", 83, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 234 }, -{ PROC_LINKS(swap_buffers_between_panels, 0), "swap_buffers_between_panels", 27, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1507 }, +{ PROC_LINKS(swap_buffers_between_panels, 0), "swap_buffers_between_panels", 27, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1524 }, { PROC_LINKS(to_lowercase, 0), "to_lowercase", 12, "Converts all ascii text in the range between the cursor and the mark to lowercase.", 82, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 391 }, { PROC_LINKS(to_uppercase, 0), "to_uppercase", 12, "Converts all ascii text in the range between the cursor and the mark to uppercase.", 82, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 371 }, { PROC_LINKS(toggle_filebar, 0), "toggle_filebar", 14, "Toggles the visibility status of the current view's filebar.", 60, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 521 }, @@ -461,10 +463,10 @@ static Command_Metadata fcoder_metacmd_table[228] = { { PROC_LINKS(toggle_line_wrap, 0), "toggle_line_wrap", 16, "Toggles the current buffer's line wrapping status.", 50, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 530 }, { PROC_LINKS(toggle_mouse, 0), "toggle_mouse", 12, "Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.", 71, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 246 }, { PROC_LINKS(toggle_paren_matching_helper, 0), "toggle_paren_matching_helper", 28, "In code files matching parentheses pairs are colored with distinguishing colors.", 80, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 276 }, -{ PROC_LINKS(toggle_show_whitespace, 0), "toggle_show_whitespace", 22, "Toggles the current buffer's whitespace visibility status.", 58, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 597 }, -{ PROC_LINKS(toggle_virtual_whitespace, 0), "toggle_virtual_whitespace", 25, "Toggles the current buffer's virtual whitespace status.", 55, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 586 }, -{ PROC_LINKS(undo, 0), "undo", 4, "Advances backwards through the undo history.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1565 }, -{ PROC_LINKS(view_buffer_other_panel, 0), "view_buffer_other_panel", 23, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1497 }, +{ PROC_LINKS(toggle_show_whitespace, 0), "toggle_show_whitespace", 22, "Toggles the current buffer's whitespace visibility status.", 58, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 614 }, +{ PROC_LINKS(toggle_virtual_whitespace, 0), "toggle_virtual_whitespace", 25, "Toggles the current buffer's virtual whitespace status.", 55, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 603 }, +{ PROC_LINKS(undo, 0), "undo", 4, "Advances backwards through the undo history.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1582 }, +{ PROC_LINKS(view_buffer_other_panel, 0), "view_buffer_other_panel", 23, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1514 }, { PROC_LINKS(view_jump_list_with_lister, 0), "view_jump_list_with_lister", 26, "When executed on a buffer with jumps, creates a persistent lister for all the jumps", 83, "w:\\4ed\\code\\4coder_jump_lister.cpp", 34, 108 }, { PROC_LINKS(word_complete, 0), "word_complete", 13, "Iteratively tries completing the word to the left of the cursor with other words in open buffers that have the same prefix string.", 130, "w:\\4ed\\code\\4coder_search.cpp", 29, 856 }, { PROC_LINKS(write_and_auto_tab, 0), "write_and_auto_tab", 18, "Inserts a character and auto-indents the line on which the cursor sits.", 71, "w:\\4ed\\code\\4coder_auto_indent.cpp", 34, 745 }, @@ -587,123 +589,124 @@ static int32_t fcoder_metacmd_ID_miblo_decrement_time_stamp_minute = 105; static int32_t fcoder_metacmd_ID_miblo_increment_basic = 106; static int32_t fcoder_metacmd_ID_miblo_increment_time_stamp = 107; static int32_t fcoder_metacmd_ID_miblo_increment_time_stamp_minute = 108; -static int32_t fcoder_metacmd_ID_mouse_wheel_scroll = 109; -static int32_t fcoder_metacmd_ID_move_down = 110; -static int32_t fcoder_metacmd_ID_move_down_10 = 111; -static int32_t fcoder_metacmd_ID_move_down_textual = 112; -static int32_t fcoder_metacmd_ID_move_left = 113; -static int32_t fcoder_metacmd_ID_move_line_down = 114; -static int32_t fcoder_metacmd_ID_move_line_up = 115; -static int32_t fcoder_metacmd_ID_move_right = 116; -static int32_t fcoder_metacmd_ID_move_up = 117; -static int32_t fcoder_metacmd_ID_move_up_10 = 118; -static int32_t fcoder_metacmd_ID_multi_line_edit = 119; -static int32_t fcoder_metacmd_ID_newline_or_goto_position_direct = 120; -static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_direct = 121; -static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_sticky = 122; -static int32_t fcoder_metacmd_ID_newline_or_goto_position_sticky = 123; -static int32_t fcoder_metacmd_ID_open_all_code = 124; -static int32_t fcoder_metacmd_ID_open_all_code_recursive = 125; -static int32_t fcoder_metacmd_ID_open_color_tweaker = 126; -static int32_t fcoder_metacmd_ID_open_file_in_quotes = 127; -static int32_t fcoder_metacmd_ID_open_in_other = 128; -static int32_t fcoder_metacmd_ID_open_long_braces = 129; -static int32_t fcoder_metacmd_ID_open_long_braces_break = 130; -static int32_t fcoder_metacmd_ID_open_long_braces_semicolon = 131; -static int32_t fcoder_metacmd_ID_open_matching_file_cpp = 132; -static int32_t fcoder_metacmd_ID_open_panel_hsplit = 133; -static int32_t fcoder_metacmd_ID_open_panel_vsplit = 134; -static int32_t fcoder_metacmd_ID_page_down = 135; -static int32_t fcoder_metacmd_ID_page_up = 136; -static int32_t fcoder_metacmd_ID_paste = 137; -static int32_t fcoder_metacmd_ID_paste_and_indent = 138; -static int32_t fcoder_metacmd_ID_paste_next = 139; -static int32_t fcoder_metacmd_ID_paste_next_and_indent = 140; -static int32_t fcoder_metacmd_ID_place_in_scope = 141; -static int32_t fcoder_metacmd_ID_project_command_lister = 142; -static int32_t fcoder_metacmd_ID_project_fkey_command = 143; -static int32_t fcoder_metacmd_ID_project_go_to_root_directory = 144; -static int32_t fcoder_metacmd_ID_query_replace = 145; -static int32_t fcoder_metacmd_ID_query_replace_identifier = 146; -static int32_t fcoder_metacmd_ID_query_replace_selection = 147; -static int32_t fcoder_metacmd_ID_redo = 148; -static int32_t fcoder_metacmd_ID_reload_themes = 149; -static int32_t fcoder_metacmd_ID_remap_interactive = 150; -static int32_t fcoder_metacmd_ID_rename_file_query = 151; -static int32_t fcoder_metacmd_ID_rename_parameter = 152; -static int32_t fcoder_metacmd_ID_reopen = 153; -static int32_t fcoder_metacmd_ID_replace_all_occurrences = 154; -static int32_t fcoder_metacmd_ID_replace_in_range = 155; -static int32_t fcoder_metacmd_ID_reverse_search = 156; -static int32_t fcoder_metacmd_ID_reverse_search_identifier = 157; -static int32_t fcoder_metacmd_ID_save = 158; -static int32_t fcoder_metacmd_ID_save_all_dirty_buffers = 159; -static int32_t fcoder_metacmd_ID_save_to_query = 160; -static int32_t fcoder_metacmd_ID_scope_absorb_down = 161; -static int32_t fcoder_metacmd_ID_search = 162; -static int32_t fcoder_metacmd_ID_search_identifier = 163; -static int32_t fcoder_metacmd_ID_seek_alphanumeric_left = 164; -static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_left = 165; -static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_right = 166; -static int32_t fcoder_metacmd_ID_seek_alphanumeric_right = 167; -static int32_t fcoder_metacmd_ID_seek_beginning_of_line = 168; -static int32_t fcoder_metacmd_ID_seek_beginning_of_textual_line = 169; -static int32_t fcoder_metacmd_ID_seek_end_of_line = 170; -static int32_t fcoder_metacmd_ID_seek_end_of_textual_line = 171; -static int32_t fcoder_metacmd_ID_seek_token_left = 172; -static int32_t fcoder_metacmd_ID_seek_token_right = 173; -static int32_t fcoder_metacmd_ID_seek_white_or_token_left = 174; -static int32_t fcoder_metacmd_ID_seek_white_or_token_right = 175; -static int32_t fcoder_metacmd_ID_seek_whitespace_down = 176; -static int32_t fcoder_metacmd_ID_seek_whitespace_down_end_line = 177; -static int32_t fcoder_metacmd_ID_seek_whitespace_left = 178; -static int32_t fcoder_metacmd_ID_seek_whitespace_right = 179; -static int32_t fcoder_metacmd_ID_seek_whitespace_up = 180; -static int32_t fcoder_metacmd_ID_seek_whitespace_up_end_line = 181; -static int32_t fcoder_metacmd_ID_select_all = 182; -static int32_t fcoder_metacmd_ID_select_next_scope_absolute = 183; -static int32_t fcoder_metacmd_ID_select_prev_scope_absolute = 184; -static int32_t fcoder_metacmd_ID_select_surrounding_scope = 185; -static int32_t fcoder_metacmd_ID_set_bindings_choose = 186; -static int32_t fcoder_metacmd_ID_set_bindings_default = 187; -static int32_t fcoder_metacmd_ID_set_bindings_mac_default = 188; -static int32_t fcoder_metacmd_ID_set_mark = 189; -static int32_t fcoder_metacmd_ID_set_mode_to_notepad_like = 190; -static int32_t fcoder_metacmd_ID_set_mode_to_original = 191; -static int32_t fcoder_metacmd_ID_setup_build_bat = 192; -static int32_t fcoder_metacmd_ID_setup_build_bat_and_sh = 193; -static int32_t fcoder_metacmd_ID_setup_build_sh = 194; -static int32_t fcoder_metacmd_ID_setup_new_project = 195; -static int32_t fcoder_metacmd_ID_show_filebar = 196; -static int32_t fcoder_metacmd_ID_show_scrollbar = 197; -static int32_t fcoder_metacmd_ID_snipe_token_or_word = 198; -static int32_t fcoder_metacmd_ID_snipe_token_or_word_right = 199; -static int32_t fcoder_metacmd_ID_snippet_lister = 200; -static int32_t fcoder_metacmd_ID_suppress_mouse = 201; -static int32_t fcoder_metacmd_ID_swap_buffers_between_panels = 202; -static int32_t fcoder_metacmd_ID_to_lowercase = 203; -static int32_t fcoder_metacmd_ID_to_uppercase = 204; -static int32_t fcoder_metacmd_ID_toggle_filebar = 205; -static int32_t fcoder_metacmd_ID_toggle_fullscreen = 206; -static int32_t fcoder_metacmd_ID_toggle_highlight_enclosing_scopes = 207; -static int32_t fcoder_metacmd_ID_toggle_highlight_line_at_cursor = 208; -static int32_t fcoder_metacmd_ID_toggle_line_wrap = 209; -static int32_t fcoder_metacmd_ID_toggle_mouse = 210; -static int32_t fcoder_metacmd_ID_toggle_paren_matching_helper = 211; -static int32_t fcoder_metacmd_ID_toggle_show_whitespace = 212; -static int32_t fcoder_metacmd_ID_toggle_virtual_whitespace = 213; -static int32_t fcoder_metacmd_ID_undo = 214; -static int32_t fcoder_metacmd_ID_view_buffer_other_panel = 215; -static int32_t fcoder_metacmd_ID_view_jump_list_with_lister = 216; -static int32_t fcoder_metacmd_ID_word_complete = 217; -static int32_t fcoder_metacmd_ID_write_and_auto_tab = 218; -static int32_t fcoder_metacmd_ID_write_block = 219; -static int32_t fcoder_metacmd_ID_write_character = 220; -static int32_t fcoder_metacmd_ID_write_explicit_enum_flags = 221; -static int32_t fcoder_metacmd_ID_write_explicit_enum_values = 222; -static int32_t fcoder_metacmd_ID_write_hack = 223; -static int32_t fcoder_metacmd_ID_write_note = 224; -static int32_t fcoder_metacmd_ID_write_todo = 225; -static int32_t fcoder_metacmd_ID_write_underscore = 226; -static int32_t fcoder_metacmd_ID_write_zero_struct = 227; +static int32_t fcoder_metacmd_ID_mouse_wheel_change_face_size = 109; +static int32_t fcoder_metacmd_ID_mouse_wheel_scroll = 110; +static int32_t fcoder_metacmd_ID_move_down = 111; +static int32_t fcoder_metacmd_ID_move_down_10 = 112; +static int32_t fcoder_metacmd_ID_move_down_textual = 113; +static int32_t fcoder_metacmd_ID_move_left = 114; +static int32_t fcoder_metacmd_ID_move_line_down = 115; +static int32_t fcoder_metacmd_ID_move_line_up = 116; +static int32_t fcoder_metacmd_ID_move_right = 117; +static int32_t fcoder_metacmd_ID_move_up = 118; +static int32_t fcoder_metacmd_ID_move_up_10 = 119; +static int32_t fcoder_metacmd_ID_multi_line_edit = 120; +static int32_t fcoder_metacmd_ID_newline_or_goto_position_direct = 121; +static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_direct = 122; +static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_sticky = 123; +static int32_t fcoder_metacmd_ID_newline_or_goto_position_sticky = 124; +static int32_t fcoder_metacmd_ID_open_all_code = 125; +static int32_t fcoder_metacmd_ID_open_all_code_recursive = 126; +static int32_t fcoder_metacmd_ID_open_color_tweaker = 127; +static int32_t fcoder_metacmd_ID_open_file_in_quotes = 128; +static int32_t fcoder_metacmd_ID_open_in_other = 129; +static int32_t fcoder_metacmd_ID_open_long_braces = 130; +static int32_t fcoder_metacmd_ID_open_long_braces_break = 131; +static int32_t fcoder_metacmd_ID_open_long_braces_semicolon = 132; +static int32_t fcoder_metacmd_ID_open_matching_file_cpp = 133; +static int32_t fcoder_metacmd_ID_open_panel_hsplit = 134; +static int32_t fcoder_metacmd_ID_open_panel_vsplit = 135; +static int32_t fcoder_metacmd_ID_page_down = 136; +static int32_t fcoder_metacmd_ID_page_up = 137; +static int32_t fcoder_metacmd_ID_paste = 138; +static int32_t fcoder_metacmd_ID_paste_and_indent = 139; +static int32_t fcoder_metacmd_ID_paste_next = 140; +static int32_t fcoder_metacmd_ID_paste_next_and_indent = 141; +static int32_t fcoder_metacmd_ID_place_in_scope = 142; +static int32_t fcoder_metacmd_ID_project_command_lister = 143; +static int32_t fcoder_metacmd_ID_project_fkey_command = 144; +static int32_t fcoder_metacmd_ID_project_go_to_root_directory = 145; +static int32_t fcoder_metacmd_ID_query_replace = 146; +static int32_t fcoder_metacmd_ID_query_replace_identifier = 147; +static int32_t fcoder_metacmd_ID_query_replace_selection = 148; +static int32_t fcoder_metacmd_ID_redo = 149; +static int32_t fcoder_metacmd_ID_reload_themes = 150; +static int32_t fcoder_metacmd_ID_remap_interactive = 151; +static int32_t fcoder_metacmd_ID_rename_file_query = 152; +static int32_t fcoder_metacmd_ID_rename_parameter = 153; +static int32_t fcoder_metacmd_ID_reopen = 154; +static int32_t fcoder_metacmd_ID_replace_all_occurrences = 155; +static int32_t fcoder_metacmd_ID_replace_in_range = 156; +static int32_t fcoder_metacmd_ID_reverse_search = 157; +static int32_t fcoder_metacmd_ID_reverse_search_identifier = 158; +static int32_t fcoder_metacmd_ID_save = 159; +static int32_t fcoder_metacmd_ID_save_all_dirty_buffers = 160; +static int32_t fcoder_metacmd_ID_save_to_query = 161; +static int32_t fcoder_metacmd_ID_scope_absorb_down = 162; +static int32_t fcoder_metacmd_ID_search = 163; +static int32_t fcoder_metacmd_ID_search_identifier = 164; +static int32_t fcoder_metacmd_ID_seek_alphanumeric_left = 165; +static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_left = 166; +static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_right = 167; +static int32_t fcoder_metacmd_ID_seek_alphanumeric_right = 168; +static int32_t fcoder_metacmd_ID_seek_beginning_of_line = 169; +static int32_t fcoder_metacmd_ID_seek_beginning_of_textual_line = 170; +static int32_t fcoder_metacmd_ID_seek_end_of_line = 171; +static int32_t fcoder_metacmd_ID_seek_end_of_textual_line = 172; +static int32_t fcoder_metacmd_ID_seek_token_left = 173; +static int32_t fcoder_metacmd_ID_seek_token_right = 174; +static int32_t fcoder_metacmd_ID_seek_white_or_token_left = 175; +static int32_t fcoder_metacmd_ID_seek_white_or_token_right = 176; +static int32_t fcoder_metacmd_ID_seek_whitespace_down = 177; +static int32_t fcoder_metacmd_ID_seek_whitespace_down_end_line = 178; +static int32_t fcoder_metacmd_ID_seek_whitespace_left = 179; +static int32_t fcoder_metacmd_ID_seek_whitespace_right = 180; +static int32_t fcoder_metacmd_ID_seek_whitespace_up = 181; +static int32_t fcoder_metacmd_ID_seek_whitespace_up_end_line = 182; +static int32_t fcoder_metacmd_ID_select_all = 183; +static int32_t fcoder_metacmd_ID_select_next_scope_absolute = 184; +static int32_t fcoder_metacmd_ID_select_prev_scope_absolute = 185; +static int32_t fcoder_metacmd_ID_select_surrounding_scope = 186; +static int32_t fcoder_metacmd_ID_set_bindings_choose = 187; +static int32_t fcoder_metacmd_ID_set_bindings_default = 188; +static int32_t fcoder_metacmd_ID_set_bindings_mac_default = 189; +static int32_t fcoder_metacmd_ID_set_mark = 190; +static int32_t fcoder_metacmd_ID_set_mode_to_notepad_like = 191; +static int32_t fcoder_metacmd_ID_set_mode_to_original = 192; +static int32_t fcoder_metacmd_ID_setup_build_bat = 193; +static int32_t fcoder_metacmd_ID_setup_build_bat_and_sh = 194; +static int32_t fcoder_metacmd_ID_setup_build_sh = 195; +static int32_t fcoder_metacmd_ID_setup_new_project = 196; +static int32_t fcoder_metacmd_ID_show_filebar = 197; +static int32_t fcoder_metacmd_ID_show_scrollbar = 198; +static int32_t fcoder_metacmd_ID_snipe_token_or_word = 199; +static int32_t fcoder_metacmd_ID_snipe_token_or_word_right = 200; +static int32_t fcoder_metacmd_ID_snippet_lister = 201; +static int32_t fcoder_metacmd_ID_suppress_mouse = 202; +static int32_t fcoder_metacmd_ID_swap_buffers_between_panels = 203; +static int32_t fcoder_metacmd_ID_to_lowercase = 204; +static int32_t fcoder_metacmd_ID_to_uppercase = 205; +static int32_t fcoder_metacmd_ID_toggle_filebar = 206; +static int32_t fcoder_metacmd_ID_toggle_fullscreen = 207; +static int32_t fcoder_metacmd_ID_toggle_highlight_enclosing_scopes = 208; +static int32_t fcoder_metacmd_ID_toggle_highlight_line_at_cursor = 209; +static int32_t fcoder_metacmd_ID_toggle_line_wrap = 210; +static int32_t fcoder_metacmd_ID_toggle_mouse = 211; +static int32_t fcoder_metacmd_ID_toggle_paren_matching_helper = 212; +static int32_t fcoder_metacmd_ID_toggle_show_whitespace = 213; +static int32_t fcoder_metacmd_ID_toggle_virtual_whitespace = 214; +static int32_t fcoder_metacmd_ID_undo = 215; +static int32_t fcoder_metacmd_ID_view_buffer_other_panel = 216; +static int32_t fcoder_metacmd_ID_view_jump_list_with_lister = 217; +static int32_t fcoder_metacmd_ID_word_complete = 218; +static int32_t fcoder_metacmd_ID_write_and_auto_tab = 219; +static int32_t fcoder_metacmd_ID_write_block = 220; +static int32_t fcoder_metacmd_ID_write_character = 221; +static int32_t fcoder_metacmd_ID_write_explicit_enum_flags = 222; +static int32_t fcoder_metacmd_ID_write_explicit_enum_values = 223; +static int32_t fcoder_metacmd_ID_write_hack = 224; +static int32_t fcoder_metacmd_ID_write_note = 225; +static int32_t fcoder_metacmd_ID_write_todo = 226; +static int32_t fcoder_metacmd_ID_write_underscore = 227; +static int32_t fcoder_metacmd_ID_write_zero_struct = 228; #endif diff --git a/4coder_generated/remapping.h b/4coder_generated/remapping.h index 258d6726..275ab72d 100644 --- a/4coder_generated/remapping.h +++ b/4coder_generated/remapping.h @@ -40,6 +40,7 @@ bind(context, key_f14, MDFR_NONE, project_fkey_command); bind(context, key_f15, MDFR_NONE, project_fkey_command); bind(context, key_f16, MDFR_NONE, project_fkey_command); bind(context, key_mouse_wheel, MDFR_NONE, mouse_wheel_scroll); +bind(context, key_mouse_wheel, MDFR_CTRL, mouse_wheel_change_face_size); end_map(context); begin_map(context, mapid_file); bind_vanilla_keys(context, write_character); @@ -214,6 +215,7 @@ bind(context, key_f14, MDFR_NONE, project_fkey_command); bind(context, key_f15, MDFR_NONE, project_fkey_command); bind(context, key_f16, MDFR_NONE, project_fkey_command); bind(context, key_mouse_wheel, MDFR_NONE, mouse_wheel_scroll); +bind(context, key_mouse_wheel, MDFR_CMND, mouse_wheel_change_face_size); end_map(context); begin_map(context, mapid_file); bind_vanilla_keys(context, write_character); @@ -377,7 +379,7 @@ Meta_Sub_Map *sub_maps; int32_t sub_map_count; LINK_PROCS(void (*fill_keys_proc)(Bind_Helper *context);) }; -static Meta_Key_Bind fcoder_binds_for_default_mapid_global[39] = { +static Meta_Key_Bind fcoder_binds_for_default_mapid_global[40] = { {0, 44, 1, "change_active_panel", 19, LINK_PROCS(change_active_panel)}, {0, 60, 1, "change_active_panel_backwards", 29, LINK_PROCS(change_active_panel_backwards)}, {0, 110, 1, "interactive_new", 15, LINK_PROCS(interactive_new)}, @@ -417,6 +419,7 @@ static Meta_Key_Bind fcoder_binds_for_default_mapid_global[39] = { {0, 55331, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, {0, 55332, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, {0, 55312, 0, "mouse_wheel_scroll", 18, LINK_PROCS(mouse_wheel_scroll)}, +{0, 55312, 1, "mouse_wheel_change_face_size", 28, LINK_PROCS(mouse_wheel_change_face_size)}, }; static Meta_Key_Bind fcoder_binds_for_default_mapid_file[78] = { {1, 0, 0, "write_character", 15, LINK_PROCS(write_character)}, @@ -549,12 +552,12 @@ static Meta_Key_Bind fcoder_binds_for_default_default_lister_ui_map[16] = { {0, 55314, 0, "lister__repaint", 15, LINK_PROCS(lister__repaint)}, }; static Meta_Sub_Map fcoder_submaps_for_default[4] = { -{"mapid_global", 12, "The following bindings apply in all situations.", 47, 0, 0, fcoder_binds_for_default_mapid_global, 39}, +{"mapid_global", 12, "The following bindings apply in all situations.", 47, 0, 0, fcoder_binds_for_default_mapid_global, 40}, {"mapid_file", 10, "The following bindings apply in general text files and most apply in code files, but some are overriden by other commands specific to code files.", 145, 0, 0, fcoder_binds_for_default_mapid_file, 78}, {"default_code_map", 16, "The following commands only apply in files where the lexer (syntax highlighting) is turned on.", 94, "mapid_file", 10, fcoder_binds_for_default_default_code_map, 30}, {"default_lister_ui_map", 21, "These commands apply in 'lister mode' such as when you open a file.", 67, 0, 0, fcoder_binds_for_default_default_lister_ui_map, 16}, }; -static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_global[39] = { +static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_global[40] = { {0, 44, 4, "change_active_panel", 19, LINK_PROCS(change_active_panel)}, {0, 60, 4, "change_active_panel_backwards", 29, LINK_PROCS(change_active_panel_backwards)}, {0, 110, 4, "interactive_new", 15, LINK_PROCS(interactive_new)}, @@ -594,6 +597,7 @@ static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_global[39] = { {0, 55331, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, {0, 55332, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, {0, 55312, 0, "mouse_wheel_scroll", 18, LINK_PROCS(mouse_wheel_scroll)}, +{0, 55312, 4, "mouse_wheel_change_face_size", 28, LINK_PROCS(mouse_wheel_change_face_size)}, }; static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_file[77] = { {1, 0, 0, "write_character", 15, LINK_PROCS(write_character)}, @@ -723,7 +727,7 @@ static Meta_Key_Bind fcoder_binds_for_mac_default_default_lister_ui_map[14] = { {0, 55314, 0, "lister__repaint", 15, LINK_PROCS(lister__repaint)}, }; static Meta_Sub_Map fcoder_submaps_for_mac_default[4] = { -{"mapid_global", 12, "The following bindings apply in all situations.", 47, 0, 0, fcoder_binds_for_mac_default_mapid_global, 39}, +{"mapid_global", 12, "The following bindings apply in all situations.", 47, 0, 0, fcoder_binds_for_mac_default_mapid_global, 40}, {"mapid_file", 10, "The following bindings apply in general text files and most apply in code files, but some are overriden by other commands specific to code files.", 145, 0, 0, fcoder_binds_for_mac_default_mapid_file, 77}, {"default_code_map", 16, "The following commands only apply in files where the lexer (syntax highlighting) is turned on.", 94, "mapid_file", 10, fcoder_binds_for_mac_default_default_code_map, 30}, {"default_lister_ui_map", 21, "These commands apply in 'lister mode' such as when you open a file.", 67, 0, 0, fcoder_binds_for_mac_default_default_lister_ui_map, 14}, diff --git a/4coder_lib/4cpp_lexer_tables.c b/4coder_lib/4cpp_lexer_tables.c index d8d16582..18c93903 100644 --- a/4coder_lib/4cpp_lexer_tables.c +++ b/4coder_lib/4cpp_lexer_tables.c @@ -215,7 +215,7 @@ u8_4tech main_fsm_table[] = { 63, 32, 33, 34, 35, 32, 63, 63, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 17, 15, 15, 18, 18, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, + 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 23, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 19, 32, 33, 34, 35, 32, 32, 32, 10, 10, 41, 42, 43, 44, 45, 15, 15, 17, 17, 20, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 14, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 15, 15, 15, 17, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, @@ -271,7 +271,7 @@ u8_4tech pp_include_fsm_table[] = { 63, 32, 33, 34, 35, 32, 63, 63, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 17, 15, 15, 18, 18, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, + 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 23, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 19, 32, 33, 34, 35, 32, 32, 32, 10, 10, 41, 42, 43, 44, 45, 15, 15, 17, 17, 20, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 14, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 15, 15, 15, 17, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, @@ -327,7 +327,7 @@ u8_4tech pp_macro_fsm_table[] = { 63, 32, 33, 34, 35, 32, 63, 63, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 17, 15, 15, 18, 18, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, + 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 23, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 19, 32, 33, 34, 35, 32, 32, 32, 10, 10, 41, 42, 43, 44, 45, 15, 15, 17, 17, 20, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 14, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 15, 15, 15, 17, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, @@ -383,7 +383,7 @@ u8_4tech pp_identifier_fsm_table[] = { 63, 32, 33, 34, 35, 32, 63, 63, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 17, 15, 15, 18, 18, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, + 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 23, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 19, 32, 33, 34, 35, 32, 32, 32, 10, 10, 41, 42, 43, 44, 45, 15, 15, 17, 17, 20, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 14, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 15, 15, 15, 17, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, @@ -439,7 +439,7 @@ u8_4tech pp_body_if_fsm_table[] = { 63, 32, 33, 34, 35, 32, 63, 63, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 17, 15, 15, 18, 18, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, + 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 23, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 19, 32, 33, 34, 35, 32, 32, 32, 10, 10, 41, 42, 43, 44, 45, 15, 15, 17, 17, 20, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 14, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 15, 15, 15, 17, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, @@ -495,7 +495,7 @@ u8_4tech pp_body_fsm_table[] = { 63, 32, 33, 34, 35, 32, 63, 63, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 17, 15, 15, 18, 18, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, + 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 23, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 19, 32, 33, 34, 35, 32, 32, 32, 10, 10, 41, 42, 43, 44, 45, 15, 15, 17, 17, 20, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 14, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 15, 15, 15, 17, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, @@ -551,7 +551,7 @@ u8_4tech pp_number_fsm_table[] = { 63, 32, 33, 34, 35, 32, 63, 63, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 17, 15, 15, 18, 18, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, + 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 23, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 19, 32, 33, 34, 35, 32, 32, 32, 10, 10, 41, 42, 43, 44, 45, 15, 15, 17, 17, 20, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 14, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 15, 15, 15, 17, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, @@ -634,7 +634,7 @@ u8_4tech pp_junk_fsm_table[] = { 63, 32, 33, 34, 35, 32, 63, 63, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 17, 15, 15, 18, 18, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, + 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 23, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 19, 32, 33, 34, 35, 32, 32, 32, 10, 10, 41, 42, 43, 44, 45, 15, 15, 17, 17, 20, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 14, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 15, 15, 15, 17, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, @@ -689,7 +689,7 @@ u8_4tech no_string_fsm_table[] = { 25, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 31, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 29, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 17, 15, 15, 18, 18, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 27, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, + 27, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 23, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 19, 32, 33, 34, 35, 62, 62, 62, 10, 10, 41, 42, 43, 44, 45, 15, 15, 17, 17, 20, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, 14, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 15, 15, 15, 17, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, diff --git a/4coder_ui_helper.cpp b/4coder_ui_helper.cpp index 3cd33082..9eeaf6a9 100644 --- a/4coder_ui_helper.cpp +++ b/4coder_ui_helper.cpp @@ -225,6 +225,10 @@ lister_arena_clear_data_ensure_bytes(Application_Links *app, Lister *lister, int lister->arena = make_part(new_memory, new_size); push_array(&lister->arena, char, lister->data.user_data_size); } + else{ + lister->arena.pos = lister->data.user_data_size; + } + push_align(&lister->arena, 8); } static void diff --git a/4ed.cpp b/4ed.cpp index 4429e316..0a746d4e 100644 --- a/4ed.cpp +++ b/4ed.cpp @@ -1210,6 +1210,8 @@ App_Step_Sig(app_step){ } Key_Event_Data mouse_event = {}; + block_copy(mouse_event.modifiers, input->keys.modifiers, sizeof(mouse_event.modifiers)); + if (input->mouse.press_l){ mouse_event.keycode = key_mouse_left; input->keys.keys[input->keys.count++] = mouse_event; diff --git a/4ed.h b/4ed.h index 693d56a2..7666c9c1 100644 --- a/4ed.h +++ b/4ed.h @@ -37,6 +37,7 @@ struct Application_Memory{ struct Key_Input_Data{ Key_Event_Data keys[KEY_INPUT_BUFFER_SIZE + KEY_EXTRA_SIZE]; i32 count; + b8 modifiers[MDFR_INDEX_COUNT]; }; typedef u8 Log_To_Type; diff --git a/4ed_api_implementation.cpp b/4ed_api_implementation.cpp index fb0098bf..a4c24d37 100644 --- a/4ed_api_implementation.cpp +++ b/4ed_api_implementation.cpp @@ -3817,5 +3817,17 @@ DOC(Sets 4coder's window title to the specified title string.) terminate_with_null(&dst); } +API_EXPORT Microsecond_Time_Stamp +Get_Microseconds_Timestamp(Application_Links *app) +/* +DOC(Returns a microsecond resolution timestamp.) +*/ +{ + // TODO(allen): do(decrease indirection in API calls) + Models *models = (Models*)app->cmd_context; + System_Functions *system = models->system; + return(system->now_time()); +} + // BOTTOM diff --git a/4ed_buffer.cpp b/4ed_buffer.cpp index 42110472..d96ae078 100644 --- a/4ed_buffer.cpp +++ b/4ed_buffer.cpp @@ -1573,24 +1573,26 @@ buffer_invert_batch(Buffer_Invert_Batch *state, Gap_Buffer *buffer, Buffer_Edit } inline Render_Item_Write -write_render_item(Render_Item_Write write, i32 index, u32 codepoint, u32 flags){ - - f32 ch_width = font_get_glyph_advance(write.system, write.font.settings, write.font.metrics, write.font.pages, codepoint); - - if (write.x <= write.x_max && write.x + ch_width >= write.x_min){ - write.item->index = index; - write.item->codepoint = codepoint; - write.item->flags = flags; - write.item->x0 = write.x; - write.item->y0 = write.y; - write.item->x1 = write.x + ch_width; - write.item->y1 = write.y + write.font_height; +write_render_item(Render_Item_Write write, i32 index, u32 codepoint, u32 flags, + b32 force_emit){ + if (write.item < write.item_end){ + f32 ch_width = font_get_glyph_advance(write.system, write.font.settings, write.font.metrics, write.font.pages, codepoint); - ++write.item; + if (write.x_min <= write.x + ch_width && write.x <= write.x_max || + force_emit){ + write.item->index = index; + write.item->codepoint = codepoint; + write.item->flags = flags; + write.item->x0 = write.x; + write.item->y0 = write.y; + write.item->x1 = write.x + ch_width; + write.item->y1 = write.y + write.font_height; + + ++write.item; + } + + write.x += ch_width; } - - write.x += ch_width; - return(write); } @@ -1604,7 +1606,7 @@ buffer_render_data(Buffer_Render_State *S_ptr, Buffer_Render_Params params, f32 Buffer_Render_State S = *S_ptr; Buffer_Layout_Stop S_stop; - Buffer_Render_Item *item_end = params.items + params.max; + S.write.item_end = params.items + params.max; switch (S.__pc__){ DrCase(1); @@ -1646,10 +1648,11 @@ buffer_render_data(Buffer_Render_State *S_ptr, Buffer_Render_Params params, f32 S.byte_advance = params.font.metrics->byte_advance; if (params.virtual_white){ - S.skipping_whitespace = 1; + S.skipping_whitespace = true; } - S.first_of_the_line = 1; + S.first_of_the_line = true; + S.first_of_the_wrap = true; S.i = params.start_cursor.pos; if (buffer_stringify_loop(&S.stream, params.buffer, S.i, S.size)){ do{ @@ -1686,7 +1689,8 @@ buffer_render_data(Buffer_Render_State *S_ptr, Buffer_Render_Params params, f32 switch (params.wrap_slashes){ case WrapIndicator_Show_After_Line: { - S.write = write_render_item(S.write, S.step.i-1, '\\', BRFlag_Ghost_Character); + S.write = write_render_item(S.write, S.step.i-1, '\\', BRFlag_Ghost_Character, + false); }break; case WrapIndicator_Show_At_Wrap_Edge: @@ -1694,23 +1698,24 @@ buffer_render_data(Buffer_Render_State *S_ptr, Buffer_Render_Params params, f32 if (S.write.x < S.shift_x + params.width){ S.write.x = S.shift_x + params.width; } - S.write = write_render_item(S.write, S.step.i-1, '\\', BRFlag_Ghost_Character); + S.write = write_render_item(S.write, S.step.i-1, '\\', BRFlag_Ghost_Character, + false); }break; } S.write.x = S.shift_x + line_shift; S.write.y += S.write.font_height; + S.first_of_the_wrap = true; } } } - if (S.write.y > params.height + params.port_y || S.write.item >= item_end){ + if (S.write.y > params.height + params.port_y || S.write.item >= S.write.item_end){ goto buffer_get_render_data_end; } - S.first_of_the_line = false; if (S.behavior.do_newline){ - S.write = write_render_item(S.write, S.step.i, ' ', 0); + S.write = write_render_item(S.write, S.step.i, ' ', 0, S.first_of_the_wrap); if (params.virtual_white){ S_stop.status = BLStatus_NeedLineShift; @@ -1728,6 +1733,7 @@ buffer_render_data(Buffer_Render_State *S_ptr, Buffer_Render_Params params, f32 S.write.y += S.write.font_height; S.first_of_the_line = true; + S.first_of_the_wrap = true; } else if (S.behavior.do_codepoint_advance){ u32 n = S.step.value; @@ -1735,32 +1741,40 @@ buffer_render_data(Buffer_Render_State *S_ptr, Buffer_Render_Params params, f32 S.skipping_whitespace = false; } + u32 I = S.step.i; if (!S.skipping_whitespace){ - u32 I = S.step.i; switch (n){ case '\r': { - S.write = write_render_item(S.write, I, '\\', BRFlag_Special_Character); - if (S.write.item < item_end){ - S.write = write_render_item(S.write, I, 'r', BRFlag_Special_Character); - } + S.write = write_render_item(S.write, I, '\\', BRFlag_Special_Character, + S.first_of_the_wrap); + S.write = write_render_item(S.write, I, 'r', BRFlag_Special_Character, + S.first_of_the_wrap); }break; case '\t': { - S.ch_width = font_get_glyph_advance(params.system, params.font.settings, params.font.metrics, params.font.pages, '\t'); + S.ch_width = font_get_glyph_advance(params.system, params.font.settings, + params.font.metrics, params.font.pages, + '\t'); f32 new_x = S.write.x + S.ch_width; - S.write = write_render_item(S.write, I, ' ', 0); + S.write = write_render_item(S.write, I, ' ', 0, S.first_of_the_wrap); S.write.x = new_x; }break; default: { - S.write = write_render_item(S.write, I, n, 0); + S.write = write_render_item(S.write, I, n, 0, S.first_of_the_wrap); }break; } } + else if (S.first_of_the_wrap){ + S.write = write_render_item(S.write, I, ' ', 0, true); + } + + S.first_of_the_line = false; + S.first_of_the_wrap = false; } else if (S.behavior.do_number_advance){ u8 n = (u8)S.step.value; @@ -1774,19 +1788,21 @@ buffer_render_data(Buffer_Render_State *S_ptr, Buffer_Render_Params params, f32 cs[0] = '\\'; byte_to_ascii(n, cs+1); - if (S.write.item < item_end){ - S.write = write_render_item(S.write, I, cs[0], BRFlag_Special_Character); - if (S.write.item < item_end){ - S.write = write_render_item(S.write, I, cs[1], BRFlag_Special_Character); - if (S.write.item < item_end){ - S.write = write_render_item(S.write, I, cs[2], BRFlag_Special_Character); - } - } - } + S.write = write_render_item(S.write, I, cs[0], BRFlag_Special_Character, + S.first_of_the_wrap); + S.write = write_render_item(S.write, I, cs[1], BRFlag_Special_Character, + S.first_of_the_wrap); + S.write = write_render_item(S.write, I, cs[2], BRFlag_Special_Character, + S.first_of_the_wrap); + Assert(S.write.x <= new_x); S.write.x = new_x; + + S.first_of_the_line = false; + S.first_of_the_wrap = false; } + if (!S.skipping_whitespace && !S.behavior.do_newline){ S.first_of_the_line = false; } @@ -1798,9 +1814,7 @@ buffer_render_data(Buffer_Render_State *S_ptr, Buffer_Render_Params params, f32 buffer_get_render_data_end:; if (S.write.y <= params.height + S.shift_y || S.write.item == params.items){ - if (S.write.item < item_end){ - S.write = write_render_item(S.write, S.size, ' ', 0); - } + S.write = write_render_item(S.write, S.size, ' ', 0, false); } *params.count = (i32)(S.write.item - params.items); diff --git a/4ed_buffer.h b/4ed_buffer.h index a595b152..850f10c9 100644 --- a/4ed_buffer.h +++ b/4ed_buffer.h @@ -168,7 +168,9 @@ struct Buffer_Render_Item{ struct Render_Item_Write{ Buffer_Render_Item *item; - f32 x, y; + Buffer_Render_Item *item_end; + f32 x; + f32 y; System_Functions *system; Font_Pointers font; i32 font_height; @@ -212,8 +214,9 @@ struct Buffer_Render_State{ i32 line; i32 wrap_line; - b32 skipping_whitespace; - b32 first_of_the_line; + b8 skipping_whitespace; + b8 first_of_the_line; + b8 first_of_the_wrap; i32 wrap_unit_end; Translation_State tran; diff --git a/4ed_render_format.cpp b/4ed_render_format.cpp index 4d3207f1..6369bab0 100644 --- a/4ed_render_format.cpp +++ b/4ed_render_format.cpp @@ -92,6 +92,7 @@ internal void draw_margin(Render_Target *target, i32_Rect outer, i32_Rect inner, u32 color){ draw_rectangle(target, i32R(outer.x0, outer.y0, outer.x1, inner.y0), color); draw_rectangle(target, i32R(outer.x0, inner.y1, outer.x1, outer.y1), color); + draw_rectangle(target, i32R(outer.x0, inner.y0, inner.x0, inner.y1), color); draw_rectangle(target, i32R(inner.x1, inner.y0, outer.x1, inner.y1), color); } diff --git a/4ed_view.cpp b/4ed_view.cpp index b31522c0..a3d75882 100644 --- a/4ed_view.cpp +++ b/4ed_view.cpp @@ -999,199 +999,201 @@ render_loaded_file_in_view__inner(Models *models, Render_Target *target, View *v } } - u32 char_color = main_color; - if (item->flags & BRFlag_Special_Character){ - char_color = special_color; - } - else if (item->flags & BRFlag_Ghost_Character){ - char_color = ghost_color; - } - - f32_Rect char_rect = f32R(item->x0, item->y0, item->x1, item->y1); - - if (view->transient.file_data.show_whitespace && highlight_color == 0 && codepoint_is_whitespace(item->codepoint)){ - highlight_this_color = style->theme.colors[Stag_Highlight_White]; - } - else{ - highlight_this_color = highlight_color; - } - - // NOTE(allen): Line marker color - if (is_new_line){ - i32 visual_line_markers_best_priority = min_i32; - visual_line_markers_color = 0; + if (item->y1 > 0){ + f32_Rect char_rect = f32R(item->x0, item->y0, item->x1, item->y1); - for (;visual_line_markers_scan_index < line_markers.count && - line_markers.markers[visual_line_markers_scan_index].pos <= ind; - visual_line_markers_scan_index += 1){ - Render_Marker *marker = &line_markers.markers[visual_line_markers_scan_index]; - Assert(marker->type == VisualType_LineHighlights); - if (marker->priority > visual_line_markers_best_priority){ - visual_line_markers_color = marker->color; - visual_line_markers_best_priority = marker->priority; + u32 char_color = main_color; + if (item->flags & BRFlag_Special_Character){ + char_color = special_color; + } + else if (item->flags & BRFlag_Ghost_Character){ + char_color = ghost_color; + } + + if (view->transient.file_data.show_whitespace && highlight_color == 0 && codepoint_is_whitespace(item->codepoint)){ + highlight_this_color = style->theme.colors[Stag_Highlight_White]; + } + else{ + highlight_this_color = highlight_color; + } + + // NOTE(allen): Line marker color + if (is_new_line){ + i32 visual_line_markers_best_priority = min_i32; + visual_line_markers_color = 0; + + for (;visual_line_markers_scan_index < line_markers.count && + line_markers.markers[visual_line_markers_scan_index].pos <= ind; + visual_line_markers_scan_index += 1){ + Render_Marker *marker = &line_markers.markers[visual_line_markers_scan_index]; + Assert(marker->type == VisualType_LineHighlights); + if (marker->priority > visual_line_markers_best_priority){ + visual_line_markers_color = marker->color; + visual_line_markers_best_priority = marker->priority; + } + } + + // NOTE(allen): Line range marker color + for (;visual_line_range_markers_scan_index < line_range_markers.count && + line_range_markers.markers[visual_line_range_markers_scan_index].pos <= ind; + visual_line_range_markers_scan_index += 1){ + Render_Marker *marker = &line_range_markers.markers[visual_line_range_markers_scan_index]; + Render_Range_Record range_record = {}; + range_record.color = marker->color; + range_record.text_color = marker->text_color; + range_record.one_past_last = marker->one_past_last; + range_record.priority = marker->priority; + i32 insert_pos = range_record_stack_get_insert_index(line_range_stack, line_range_stack_top + 1, range_record.priority); + memmove(line_range_stack + insert_pos + 1, + line_range_stack + insert_pos, + sizeof(*line_range_stack)*(line_range_stack_top - insert_pos + 1)); + line_range_stack[insert_pos] = range_record; + line_range_stack_top += 1; + } + for (;line_range_stack_top >= 0 && ind > line_range_stack[line_range_stack_top].one_past_last; + line_range_stack_top -= 1); + if (visual_line_markers_color == 0 && line_range_stack_top >= 0){ + visual_line_markers_color = line_range_stack[line_range_stack_top].color; } } - // NOTE(allen): Line range marker color - for (;visual_line_range_markers_scan_index < line_range_markers.count && - line_range_markers.markers[visual_line_range_markers_scan_index].pos <= ind; - visual_line_range_markers_scan_index += 1){ - Render_Marker *marker = &line_range_markers.markers[visual_line_range_markers_scan_index]; + u32 marker_line_highlight = 0; + if (is_new_line || is_new_wrap){ + marker_line_highlight = visual_line_markers_color; + } + + // NOTE(allen): Visual marker colors + i32 marker_highlight_best_priority = min_i32; + u32 marker_highlight = 0; + u32 marker_highlight_text = 0; + + i32 marker_wireframe_best_priority = min_i32; + u32 marker_wireframe = 0; + + i32 marker_ibar_best_priority = min_i32; + u32 marker_ibar = 0; + + for (;visual_markers_scan_index < character_markers.count && + character_markers.markers[visual_markers_scan_index].pos <= ind; + visual_markers_scan_index += 1){ + Render_Marker *marker = &character_markers.markers[visual_markers_scan_index]; + switch (marker->type){ + case VisualType_CharacterBlocks: + { + if (marker->priority > marker_highlight_best_priority){ + marker_highlight = marker->color; + marker_highlight_text = marker->text_color; + marker_highlight_best_priority = marker->priority; + } + }break; + + case VisualType_CharacterWireFrames: + { + if (marker->priority > marker_wireframe_best_priority){ + marker_wireframe = marker->color; + marker_wireframe_best_priority = marker->priority; + } + }break; + + case VisualType_CharacterIBars: + { + if (marker->priority > marker_ibar_best_priority){ + marker_ibar = marker->color; + marker_ibar_best_priority = marker->priority; + } + }break; + + default: + { + InvalidCodePath; + }break; + } + } + + // NOTE(allen): Highlight range marker color + for (;visual_range_markers_scan_index < range_markers.count && + range_markers.markers[visual_range_markers_scan_index].pos <= ind; + visual_range_markers_scan_index += 1){ + Render_Marker *marker = &range_markers.markers[visual_range_markers_scan_index]; Render_Range_Record range_record = {}; range_record.color = marker->color; range_record.text_color = marker->text_color; range_record.one_past_last = marker->one_past_last; range_record.priority = marker->priority; - i32 insert_pos = range_record_stack_get_insert_index(line_range_stack, line_range_stack_top + 1, range_record.priority); - memmove(line_range_stack + insert_pos + 1, - line_range_stack + insert_pos, - sizeof(*line_range_stack)*(line_range_stack_top - insert_pos + 1)); - line_range_stack[insert_pos] = range_record; - line_range_stack_top += 1; + i32 insert_pos = range_record_stack_get_insert_index(range_stack, range_stack_top + 1, range_record.priority); + memmove(range_stack + insert_pos + 1, + range_stack + insert_pos, + sizeof(*range_stack)*(range_stack_top - insert_pos + 1)); + range_stack[insert_pos] = range_record; + range_stack_top += 1; } - for (;line_range_stack_top >= 0 && ind > line_range_stack[line_range_stack_top].one_past_last; - line_range_stack_top -= 1); - if (visual_line_markers_color == 0 && line_range_stack_top >= 0){ - visual_line_markers_color = line_range_stack[line_range_stack_top].color; + for (;range_stack_top >= 0 && ind >= range_stack[range_stack_top].one_past_last; + range_stack_top -= 1); + 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; } - } - - u32 marker_line_highlight = 0; - if (is_new_line || is_new_wrap){ - marker_line_highlight = visual_line_markers_color; - } - - // NOTE(allen): Visual marker colors - i32 marker_highlight_best_priority = min_i32; - u32 marker_highlight = 0; - u32 marker_highlight_text = 0; - - i32 marker_wireframe_best_priority = min_i32; - u32 marker_wireframe = 0; - - i32 marker_ibar_best_priority = min_i32; - u32 marker_ibar = 0; - - for (;visual_markers_scan_index < character_markers.count && - character_markers.markers[visual_markers_scan_index].pos <= ind; - visual_markers_scan_index += 1){ - Render_Marker *marker = &character_markers.markers[visual_markers_scan_index]; - switch (marker->type){ - case VisualType_CharacterBlocks: - { - if (marker->priority > marker_highlight_best_priority){ - marker_highlight = marker->color; - marker_highlight_text = marker->text_color; - marker_highlight_best_priority = marker->priority; - } - }break; - - case VisualType_CharacterWireFrames: - { - if (marker->priority > marker_wireframe_best_priority){ - marker_wireframe = marker->color; - marker_wireframe_best_priority = marker->priority; - } - }break; - - case VisualType_CharacterIBars: - { - if (marker->priority > marker_ibar_best_priority){ - marker_ibar = marker->color; - marker_ibar_best_priority = marker->priority; - } - }break; - - default: - { - InvalidCodePath; - }break; + + // NOTE(allen): Perform highlight, wireframe, and ibar renders + u32 color_highlight = 0; + u32 color_wireframe = 0; + u32 color_ibar = 0; + + if (marker_highlight != 0){ + if (color_highlight == 0){ + color_highlight = marker_highlight; + } } - } - - // NOTE(allen): Highlight range marker color - for (;visual_range_markers_scan_index < range_markers.count && - range_markers.markers[visual_range_markers_scan_index].pos <= ind; - visual_range_markers_scan_index += 1){ - Render_Marker *marker = &range_markers.markers[visual_range_markers_scan_index]; - Render_Range_Record range_record = {}; - range_record.color = marker->color; - range_record.text_color = marker->text_color; - range_record.one_past_last = marker->one_past_last; - range_record.priority = marker->priority; - i32 insert_pos = range_record_stack_get_insert_index(range_stack, range_stack_top + 1, range_record.priority); - memmove(range_stack + insert_pos + 1, - range_stack + insert_pos, - sizeof(*range_stack)*(range_stack_top - insert_pos + 1)); - range_stack[insert_pos] = range_record; - range_stack_top += 1; - } - for (;range_stack_top >= 0 && ind >= range_stack[range_stack_top].one_past_last; - range_stack_top -= 1); - 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; - } - - // NOTE(allen): Perform highlight, wireframe, and ibar renders - u32 color_highlight = 0; - u32 color_wireframe = 0; - u32 color_ibar = 0; - - if (marker_highlight != 0){ - if (color_highlight == 0){ - color_highlight = marker_highlight; + if (marker_wireframe != 0){ + if (color_wireframe == 0){ + color_wireframe = marker_wireframe; + } } - } - if (marker_wireframe != 0){ - if (color_wireframe == 0){ - color_wireframe = marker_wireframe; + if (marker_ibar != 0){ + if (color_ibar == 0){ + color_ibar = marker_ibar; + } } - } - if (marker_ibar != 0){ - if (color_ibar == 0){ - color_ibar = marker_ibar; + if (highlight_this_color != 0){ + if (color_highlight == 0){ + color_highlight = highlight_this_color; + } } - } - if (highlight_this_color != 0){ - if (color_highlight == 0){ - color_highlight = highlight_this_color; + + if (marker_line_highlight != 0){ + f32_Rect line_rect = f32R((f32)rect.x0, char_rect.y0, (f32)rect.x1, char_rect.y1); + draw_rectangle(target, line_rect, marker_line_highlight); + } + if (color_highlight != 0){ + draw_rectangle(target, char_rect, color_highlight); + } + + if (marker_highlight_text != SymbolicColor_Default){ + char_color = marker_highlight_text; + } + + u32 fade_color = 0xFFFF00FF; + f32 fade_amount = 0.f; + if (file->state.paste_effect.seconds_down > 0.f && + file->state.paste_effect.start <= ind && + ind < file->state.paste_effect.end){ + fade_color = file->state.paste_effect.color; + fade_amount = file->state.paste_effect.seconds_down; + fade_amount /= file->state.paste_effect.seconds_max; + } + char_color = color_blend(char_color, fade_amount, fade_color); + if (item->codepoint != 0){ + draw_font_glyph(target, font_id, item->codepoint, item->x0, item->y0, char_color); + } + + if (color_wireframe != 0){ + draw_rectangle_outline(target, char_rect, color_wireframe); + } + if (color_ibar != 0){ + f32_Rect ibar_rect = f32R(char_rect.x0, char_rect.y0, char_rect.x0 + 1, char_rect.y1); + draw_rectangle_outline(target, ibar_rect, color_ibar); } - } - - if (marker_line_highlight != 0){ - f32_Rect line_rect = f32R((f32)rect.x0, char_rect.y0, (f32)rect.x1, char_rect.y1); - draw_rectangle(target, line_rect, marker_line_highlight); - } - if (color_highlight != 0){ - draw_rectangle(target, char_rect, color_highlight); - } - - if (marker_highlight_text != SymbolicColor_Default){ - char_color = marker_highlight_text; - } - - u32 fade_color = 0xFFFF00FF; - f32 fade_amount = 0.f; - if (file->state.paste_effect.seconds_down > 0.f && - file->state.paste_effect.start <= ind && - ind < file->state.paste_effect.end){ - fade_color = file->state.paste_effect.color; - fade_amount = file->state.paste_effect.seconds_down; - fade_amount /= file->state.paste_effect.seconds_max; - } - char_color = color_blend(char_color, fade_amount, fade_color); - if (item->codepoint != 0){ - draw_font_glyph(target, font_id, item->codepoint, item->x0, item->y0, char_color); - } - - if (color_wireframe != 0){ - draw_rectangle_outline(target, char_rect, color_wireframe); - } - if (color_ibar != 0){ - f32_Rect ibar_rect = f32R(char_rect.x0, char_rect.y0, char_rect.x0 + 1, char_rect.y1); - draw_rectangle_outline(target, ibar_rect, color_ibar); } prev_ind = ind; diff --git a/meta/4ed_fsm_table_generator.cpp b/meta/4ed_fsm_table_generator.cpp index c939a281..f2fc5a38 100644 --- a/meta/4ed_fsm_table_generator.cpp +++ b/meta/4ed_fsm_table_generator.cpp @@ -557,7 +557,7 @@ main_fsm(Cpp_Lex_FSM fsm, uint8_t pp_state, uint8_t c, bool32 ignore_string_deli case LS_crazy_float0: { - if ((c >= '0' && c <= '9') || c == '-'){ + if (('0' <= c && c <= '9') || c == '-' || c == '+'){ fsm.state = LS_crazy_float1; } else{ diff --git a/meta/4ed_metagen.cpp b/meta/4ed_metagen.cpp index 467c0db7..aae6930a 100644 --- a/meta/4ed_metagen.cpp +++ b/meta/4ed_metagen.cpp @@ -457,6 +457,7 @@ generate_remapping_code_and_data(Partition *part){ bind(part, mappings, key_f16, MDFR_NONE, project_fkey_command); bind(part, mappings, key_mouse_wheel, MDFR_NONE, mouse_wheel_scroll); + bind(part, mappings, key_mouse_wheel, MDFR_CTRL, mouse_wheel_change_face_size); end_map(mappings); @@ -679,6 +680,7 @@ generate_remapping_code_and_data(Partition *part){ bind(part, mappings, key_f16, MDFR_NONE, project_fkey_command); bind(part, mappings, key_mouse_wheel, MDFR_NONE, mouse_wheel_scroll); + bind(part, mappings, key_mouse_wheel, MDFR_CMND, mouse_wheel_change_face_size); end_map(mappings); diff --git a/platform_all/4ed_shared_init_logic.cpp b/platform_all/4ed_shared_init_logic.cpp index 25016cfc..31de07f4 100644 --- a/platform_all/4ed_shared_init_logic.cpp +++ b/platform_all/4ed_shared_init_logic.cpp @@ -15,17 +15,17 @@ memory_init(){ # if defined(FTECH_64_BIT) void *bases[] = { (void*)TB(1), (void*)TB(2), }; # elif defined(FTECH_32_BIT) - void *bases[] = { (void*)MB(96), (void*)MB(98), }; + void *bases[] = { (void*)MB(96), (void*)MB(512), }; # endif #else void *bases[] = { (void*)0, (void*)0, }; #endif - memory_vars.vars_memory_size = MB(2); + memory_vars.vars_memory_size = MB(128); memory_vars.vars_memory = system_memory_allocate_extended(bases[0], memory_vars.vars_memory_size); memory_vars.target_memory_size = MB(512); memory_vars.target_memory = system_memory_allocate_extended(bases[1], memory_vars.target_memory_size); - memory_vars.user_memory_size = MB(2); + memory_vars.user_memory_size = MB(32); memory_vars.user_memory = system_memory_allocate_extended(0, memory_vars.user_memory_size); memory_vars.debug_memory_size = MB(512); memory_vars.debug_memory = system_memory_allocate_extended(0, memory_vars.debug_memory_size); diff --git a/platform_win32/win32_4ed.cpp b/platform_win32/win32_4ed.cpp index 77bbe9ae..c51c9874 100644 --- a/platform_win32/win32_4ed.cpp +++ b/platform_win32/win32_4ed.cpp @@ -92,8 +92,10 @@ global Control_Keys null_control_keys = {}; struct Win32_Input_Chunk_Transient{ Key_Input_Data key_data; - b8 mouse_l_press, mouse_l_release; - b8 mouse_r_press, mouse_r_release; + b8 mouse_l_press; + b8 mouse_l_release; + b8 mouse_r_press; + b8 mouse_r_release; b8 out_of_window; i8 mouse_wheel; b8 trying_to_kill; @@ -676,7 +678,7 @@ Sys_Add_Listener_Sig(system_add_listener){ if (dir_handle != 0 && dir_handle != INVALID_HANDLE_VALUE){ Directory_Track_Node *new_node = file_track_store_new_dir_node(dir_name_string, dir_handle); CreateIoCompletionPort(dir_handle, file_track_iocp, (ULONG_PTR)&new_node->overlapped, 1); - // TODO(allen): // TODO(allen): // TODO(allen): // TODO(allen): // TODO(allen): // TODO(allen): + // TODO(allen): // TODO(allen): // TODO(allen): // TODO(allen): // TODO(allen): // TODO(allen): // Actually need to issue this from the file_track_worker thread as an instruction! ReadDirectoryChangesW(dir_handle, new_node->buffer, sizeof(new_node->buffer), FALSE, file_track_flags, 0, &new_node->overlapped, 0); @@ -1368,8 +1370,8 @@ Win32SetCursorFromUpdate(Application_Mouse_Cursor cursor){ } } -internal u64 -Win32HighResolutionTime(){ +internal +Sys_Now_Time_Sig(system_now_time){ u64 result = 0; LARGE_INTEGER t; if (QueryPerformanceCounter(&t)){ @@ -1667,7 +1669,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdS win32vars.prev_cursor_show = MouseCursorShow_Always; // - // HACK(allen): + // HACK(allen): // Previously zipped stuff is here, it should be zipped in the new pattern now. // @@ -1871,13 +1873,13 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdS ShowWindow(win32vars.window_handle, SW_SHOW); LOG("Beginning main loop\n"); - u64 timer_start = Win32HighResolutionTime(); + u64 timer_start = system_now_time(); system_acquire_lock(FRAME_LOCK); MSG msg; for (;keep_running;){ // TODO(allen): Find a good way to wait on a pipe // without interfering with the reading process. - // NOTE(allen): Looks like we can ReadFile with a + // NOTE(allen): Looks like we can ReadFile with a // size of zero in an IOCP for this effect. if (!win32vars.first){ system_release_lock(FRAME_LOCK); @@ -2008,6 +2010,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdS input.dt = frame_useconds/1000000.f; input.keys = input_chunk.trans.key_data; + memcpy(input.keys.modifiers, input_chunk.pers.control_keys, sizeof(input.keys.modifiers)); input.mouse.out_of_window = input_chunk.trans.out_of_window; @@ -2131,17 +2134,17 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdS // NOTE(allen): Sleep a Bit to Cool Off :) flush_thread_group(BACKGROUND_THREADS); - u64 timer_end = Win32HighResolutionTime(); + u64 timer_end = system_now_time(); u64 end_target = timer_start + frame_useconds; system_release_lock(FRAME_LOCK); while (timer_end < end_target){ DWORD samount = (DWORD)((end_target - timer_end) / 1000); if (samount > 0) Sleep(samount); - timer_end = Win32HighResolutionTime(); + timer_end = system_now_time(); } - system_acquire_lock(FRAME_LOCK); - timer_start = Win32HighResolutionTime(); + system_acquire_lock(FRAME_LOCK); + timer_start = system_now_time(); // TODO(allen): Only rely on version right inside input? win32vars.first = 0; diff --git a/platform_win32/win32_4ed_functions.cpp b/platform_win32/win32_4ed_functions.cpp index d1ebae40..89cefda7 100644 --- a/platform_win32/win32_4ed_functions.cpp +++ b/platform_win32/win32_4ed_functions.cpp @@ -446,15 +446,5 @@ system_directory_exists(char *path){ return(attrib != INVALID_FILE_ATTRIBUTES && (attrib & FILE_ATTRIBUTE_DIRECTORY)); } -// -// Time -// - -internal -Sys_Now_Time_Sig(system_now_time){ - u64 result = __rdtsc(); - return(result); -} - // BOTTOM diff --git a/todo.txt b/todo.txt index e34dc411..2f02e9fd 100644 --- a/todo.txt +++ b/todo.txt @@ -5,6 +5,12 @@ [] Recover scroll bars [] Cold scroll [] Optimize lookup in file track data structures + [] Fill Key_Input_Data's modifiers field + { + [x] windows + [] linux + [] mac + } } Bugs @@ -18,15 +24,20 @@ [x] Notepad like mode replacing text with cursor at end of selection in middle of long file [x] Renaming a file to a case insensitively equivalent name on windows deletes the file [x] Start from windows start menu and open file - [] opening large projects - [] Make lots of new files - [] Texture binding changes too often problem - [] SSHFS segfault on linux - [] New file when the file is already open - [] really long single line wrapped (300,000?) + [?] opening large projects + [x] Make lots of new files + [x] Modifiers on scroll wheels not working? + [x] Lexing Scientific Notation " 3.402823466e+38F " + [x] really long single line wrapped (300,000?) + { + [] Can we prevent creation of Buffer_Render_Items that are off the top? + } + [x] scope coloring when scrolled to the right problem + [] Open file when lister hot directory doesn't match lister current directory [] Mac german keyboard layout [] Linux animate bug? (Lister lag) - [] Modifiers on scroll wheels not working? + [] SSHFS segfault on linux + Repro Needed { [?] pasting long comment at top of code files doesn't always parse right away??? @@ -62,7 +73,7 @@ Long Term [] Remote Desktop Doesn't Work -> Need Renderer Modularity & Software Renderer [] Graphics problem (fonts not rendering) -> need more info [] Jim's file is blank even though it tries to load a real file (wtf) - [] Lexing Scientific Notation " 3.402823466e+38F " + [] Texture binding changes too often problem } }