diff --git a/4coder_config.cpp b/4coder_config.cpp index 3d45f8b3..e16d5fee 100644 --- a/4coder_config.cpp +++ b/4coder_config.cpp @@ -70,23 +70,25 @@ get_error_location(char *base, char *pos){ static String config_stringize_errors(Partition *arena, Config *parsed){ String result = {0}; - result.str = push_array(arena, char, 0); - result.memory_size = partition_remaining(arena); - for (Config_Error *error = parsed->first_error; - error != 0; - error = error->next){ - Error_Location location = get_error_location(parsed->data.str, error->pos); - append(&result, error->file_name); - append(&result, ":"); - append_int_to_str(&result, location.line_number); - append(&result, ":"); - append_int_to_str(&result, location.column_number); - append(&result, ": "); - append(&result, error->text); - append(&result, "\n"); + if (parsed->first_error != 0){ + result.str = push_array(arena, char, 0); + result.memory_size = partition_remaining(arena); + for (Config_Error *error = parsed->first_error; + error != 0; + error = error->next){ + Error_Location location = get_error_location(parsed->data.str, error->pos); + append(&result, error->file_name); + append(&result, ":"); + append_int_to_str(&result, location.line_number); + append(&result, ":"); + append_int_to_str(&result, location.column_number); + append(&result, ": "); + append(&result, error->text); + append(&result, "\n"); + } + result.memory_size = result.size; + push_array(arena, char, result.size); } - result.memory_size = result.size; - push_array(arena, char, result.size); return(result); } @@ -1182,17 +1184,104 @@ theme_parse__file_name(Application_Links *app, Partition *arena, //////////////////////////////// +static void +config_feedback_bool(String *space, char *name, bool32 val){ + append(space, name); + append(space, " = "); + append(space, val?"true":"false"); + append(space, ";\n"); +} + +static void +config_feedback_string(String *space, char *name, String val){ + if (val.size > 0){ + append(space, name); + append(space, " = \""); + append(space, val); + append(space, "\";\n"); + } +} + +static void +config_feedback_string(String *space, char *name, char *val){ + config_feedback_string(space, name, make_string_slowly(val)); +} + +static void +config_feedback_extension_list(String *space, char *name, Extension_List *list){ + if (list->count > 0){ + append(space, name); + append(space, " = \""); + for (int32_t i = 0; i < list->count; ++i){ + append(space, "."); + append(space, list->exts[i]); + } + append(space, "\";\n"); + } +} + +static void +config_feedback_int(String *space, char *name, int32_t val){ + append(space, name); + append(space, " = "); + append_int_to_str(space, val); + append(space, ";\n"); +} + +//////////////////////////////// + static void load_config_and_apply(Application_Links *app, Partition *scratch, Config_Data *config){ Temp_Memory temp = begin_temp_memory(scratch); Config *parsed = config_parse__file_name(app, scratch, "config.4coder", config); - String error_text = config_stringize_errors(scratch, parsed); - print_message(app, error_text.str, error_text.size); - end_temp_memory(temp); - change_mapping(app, config->current_mapping); - adjust_all_buffer_wrap_widths(app, config->default_wrap_width, config->default_min_base_width); - global_set_setting(app, GlobalSetting_LAltLCtrlIsAltGr, config->lalt_lctrl_is_altgr); + if (parsed != 0){ + // Top + print_message(app, literal("Loaded config file:\n")); + + // Errors + String error_text = config_stringize_errors(scratch, parsed); + if (error_text.str != 0){ + print_message(app, error_text.str, error_text.size); + } + + // Values + Temp_Memory temp2 = begin_temp_memory(scratch); + String space = push_string(scratch, partition_remaining(scratch)); + config_feedback_string(&space, "user_name", config->user_name); + config_feedback_extension_list(&space, "treat_as_code", &config->code_exts); + config_feedback_string(&space, "current_mapping", config->current_mapping); + + config_feedback_bool(&space, "enable_code_wrapping", config->enable_code_wrapping); + config_feedback_bool(&space, "automatically_indent_text_on_save", config->automatically_indent_text_on_save); + config_feedback_bool(&space, "automatically_save_changes_on_build", config->automatically_save_changes_on_build); + config_feedback_bool(&space, "automatically_adjust_wrapping", config->automatically_adjust_wrapping); + config_feedback_bool(&space, "automatically_load_project", config->automatically_load_project); + + config_feedback_int(&space, "default_wrap_width", config->default_wrap_width); + config_feedback_int(&space, "default_min_base_width", config->default_min_base_width); + + config_feedback_string(&space, "default_theme_name", config->default_theme_name); + config_feedback_string(&space, "default_font_name", config->default_font_name); + + config_feedback_string(&space, "default_compiler_bat", config->default_compiler_bat); + config_feedback_string(&space, "default_flags_bat", config->default_flags_bat); + config_feedback_string(&space, "default_compiler_sh", config->default_compiler_sh); + config_feedback_string(&space, "default_flags_sh", config->default_flags_sh); + + config_feedback_bool(&space, "lalt_lctrl_is_altgr", config->lalt_lctrl_is_altgr); + + append(&space, "\n"); + print_message(app, space.str, space.size); + end_temp_memory(temp2); + + // Apply config + change_mapping(app, config->current_mapping); + adjust_all_buffer_wrap_widths(app, config->default_wrap_width, config->default_min_base_width); + global_set_setting(app, GlobalSetting_LAltLCtrlIsAltGr, config->lalt_lctrl_is_altgr); + } + + end_temp_memory(temp); } static void diff --git a/4coder_config.h b/4coder_config.h index ed2dfd1b..c86431ad 100644 --- a/4coder_config.h +++ b/4coder_config.h @@ -146,15 +146,22 @@ struct CString_Array{ }; struct Config_Data{ - int32_t default_wrap_width; - int32_t default_min_base_width; + char user_name_space[256]; + String user_name; + + Extension_List code_exts; + + char current_mapping_space[256]; + String current_mapping; bool32 enable_code_wrapping; - bool32 automatically_adjust_wrapping; bool32 automatically_indent_text_on_save; bool32 automatically_save_changes_on_build; + bool32 automatically_adjust_wrapping; bool32 automatically_load_project; - bool32 lalt_lctrl_is_altgr; + + int32_t default_wrap_width; + int32_t default_min_base_width; char default_theme_name_space[256]; String default_theme_name; @@ -162,9 +169,6 @@ struct Config_Data{ char default_font_name_space[256]; String default_font_name; - char user_name_space[256]; - String user_name; - char default_compiler_bat_space[256]; String default_compiler_bat; @@ -177,10 +181,7 @@ struct Config_Data{ char default_flags_sh_space[1024]; String default_flags_sh; - char current_mapping_space[256]; - String current_mapping; - - Extension_List code_exts; + bool32 lalt_lctrl_is_altgr; }; struct Theme_Data{ diff --git a/4coder_default_framework.cpp b/4coder_default_framework.cpp index f9c107b9..521af11f 100644 --- a/4coder_default_framework.cpp +++ b/4coder_default_framework.cpp @@ -356,14 +356,12 @@ buffer_set_font(Application_Links *app, Buffer_Summary *buffer, char *name, int3 static Face_ID get_face_id_by_description(Application_Links *app, Face_Description *description, Face_Description *base_description){ Face_ID new_id = 0; - if (!descriptions_match(description, base_description)){ new_id = get_existing_face_id_matching_description(app, description); if (new_id == 0){ new_id = try_create_new_face(app, description); } } - return(new_id); } @@ -423,6 +421,16 @@ init_memory(Application_Links *app){ static void default_4coder_initialize(Application_Links *app, bool32 use_scrollbars, bool32 use_file_bars){ init_memory(app); + + static const char message[] = "" + "Welcome to " VERSION "\n" + "If you're new to 4coder there are some tutorials at http://4coder.net/tutorials.html\n" + "Direct bug reports to editor@4coder.net for maximum reply speed\n" + "Questions or requests can go to editor@4coder.net or to 4coder.handmade.network\n" + "\n"; + String msg = make_lit_string(message); + print_message(app, msg.str, msg.size); + load_config_and_apply(app, &global_part, &global_config); load_folder_of_themes_into_live_set(app, &global_part, "themes"); diff --git a/4ed.cpp b/4ed.cpp index 55d25edd..df238fc4 100644 --- a/4ed.cpp +++ b/4ed.cpp @@ -9,199 +9,6 @@ // TOP -// Messages -global_const char messages[] = -"----------------------------------------------------------------\n" -"Welcome to " VERSION "\n" -"If you're new to 4coder there are some tutorials at http://4coder.net/tutorials.html\n" -"Direct bug reports to editor@4coder.net for maximum reply speed\n" -"Questions or requests can go to editor@4coder.net or to 4coder.handmade.network\n" -"\n" -"In alpha 4.0.26:\n" -" Routine bug fixing...\n" -"-Fixed various text input crash bugs\n" -"-Fixed load large file crash bug\n" -"-Fixed crash in 'list_all_locations_of_type_definition_of_identifier'\n" -"-Fixed sticky jump crash\n" -"-Fixed line move/delete bugs on last line of file\n" -"-Fixed to work on indefinitely long lines\n" -"-Fixed jump behavior quirks with parsing and cursor movement\n" -"-Fixed rare bug causing copy from other applications to fail on Windows\n" -"-Fixed auto indent commands to do a better job picking an anchor for parsing\n" -" Testing system now in place (windows only):\n" -" Flag -R creates an 'input recording' file of the 4coder session\n" -" Flag -T overrides user input and drives input by the input recorded in the specified file\n" -"\n" -"\n" -"New in alpha 4.0.25:\n" -"-Support for unbounded paste sizes\n" -"-Window title now reflects the open project file\n" -"-Buffer names resolve with more path information instead of just a counter\n" -"-Support for Rust error format and improved autoindenting for Rust\n" -"-Work around for bug in make on Windows\n" -"-New commands:\n" -" show the current buffer in the other panel (side by side)\n" -" show the current buffer in the other panel (swap with other buffer)\n" -" list all type definition locations of a particular string ~ if only one jump to it instead\n" -" list all type definition locations of the token under the cursor ~ if only one jump to it instead\n" -"-The indenter no longer does anything to multi-line strings such as raw strings.\n" -"-The customization API now has the ability to set the window's title.\n" -"-The customization API has a hook for resolving buffer name conflicts.\n" -"\n" -"New in alpha 4.0.24:\n" -"-Fonts can now be loaded from the system API or from the fonts folder\n" -"-Fonts can now be resized at run time, hinting can be toggled at run time\n" -"-Fonts can now be rendered with any combination of the styles: bold, italic, underline\n" -" (That is provided the font supports the style.)\n" -"-Now font faces can have different sizes simultaneously, or have the different hinting or styling configurations.\n" -"-Lots of new built in commands including:\n" -" delete the line under the cursor\n" -" duplicate the line under the cursor\n" -" move the line under the cursor up\n" -" move the line under the cursor down\n" -" select surrounding scope in code file\n" -" select the next scope up in code file\n" -" select the next scope down in code file\n" -" if a scope is selected, delete it's braces\n" -" if a scope is selected, absorb the statement below it into the scope\n" -" + 'delete file' close the current buffer and delete it's physical file\n" -" + 'rename file' rename the current buffer's physical file and reopen the buffer with the new file name\n" -" + 'mkdir' create a new directory\n" -"-The customization API is extended for more explicit font face control.\n" -"-The customization API comes with a parser and generator for generating metadata on built in and custom commands.\n" -"\n" -"New in alpha 4.0.22 and 4.0.23:\n" -"-The rendering layer is cleaned up and faster\n" -"-4coder can now ship with multiple built in command bindings\n" -" New built in binding \"mac-default\": For the mac version of 4coder - similar to most Mac applications\n" -"-Fullscreen now works on Windows without the '-S' flag\n" -"-Set up a single 4coder project for Windows/Linux/Mac in one command: -> \"new project\"\n" -"\n" -"New in alpha 4.0.21:\n" -"-Color schemes are now loaded in theme files from the \"themes\" folder\n" -"-After loading a project sets the hot directory to the project directory\n" -"-The flag -L enables a logging system that will collect information in case more information is needed while debugging a problem\n" -"-All command line flags after the special flag --custom are now passed to the custom API start hook\n" -"-The start hook now gets the list of file names that were specified on the command line\n" -" All of the files specified on the command line are loaded before the start hook runs\n" -"-It is now possible to set the hot directory from the custom API\n" -"-On windows the buildsuper scripts are improved to look for vcvarsall.bat in lots of common locations\n" -"\n" -"New in alpha 4.0.20:\n" -"-Option for LAlt + LCtrl = AltGr on Windows is now in config.4coder\n" -"-The 4cpp lexer now has a customizable keyword table, *experimental* expansion of language support to:\n" -" Rust, C#, Java\n" -" Arbitrary keyword customization available in custom code (super users)\n" -"\n" -"New in alpha 4.0.19:\n" -"-Lexer now handles string literal prefixes and is more optimized\n" -"-Fixes for lingering unicode bugs\n" -"-Power users have an experimental new jump to error that keeps correct positions through edits (coming to all tiers soon)\n" -"\n" -"New in alpha 4.0.18:\n" -"-Support for rendering unicode characters\n" -"- isearch alpha-numeric word under cursor\n" -"- query replace alpha-numeric word under cursor\n" -"- toggle file bar\n" -"\n" -"New in alpha 4.0.17:\n" -"-New support for extended ascii input.\n" -"-Extended ascii encoded in buffers as utf8.\n" -"-The custom layer now has a 'markers' API for tracking buffer positions across changes.\n" -"\n" -"New in alpha 4.0.16:\n" -"- If the current file is a C++ code file, this opens the matching header.\n"" If the current file is a C++ header, this opens the matching code file.\n" -"-Option to automatically save changes on build in the config file.\n" -" This works for builds triggered by .\n" -"-Option in project files to have certain fkey commands save changes.\n" -"\n" -"New in alpha 4.0.15:\n" -"- find all functions in the current buffer and list them in a jump buffer\n" -"-option to set user name in config.4coder\n" -" The user name is used in and comment writing commands\n" -"\n" -"New in alpha 4.0.14:\n" -"-Option to have wrap widths automatically adjust based on average view width\n" -"-The 'config.4coder' file can now be placed with the 4ed executable file\n" -"-New options in 'config.4coder' to specify the font and color theme\n" -"-New built in project configuration system\n" -"-New on-save hooks allows custom behavior in the custom layer whenever a file is saved\n" -"-When using code wrapping, any saved file is automatically indented in the text format, this option can be turned off in config.4coder\n" -"\n" -"New in alpha 4.0.12 and 4.0.13:\n" -"-Text files wrap lines at whitespace when possible\n" -"-New code wrapping feature is on by default\n" -"-Introduced a 'config.4coder' for setting several wrapping options:\n" -" enable_code_wrapping: set to false if you want the text like behavior\n" -" default_wrap_width: the wrap width to set in new files\n" -"- decrease the current buffer's wrap width\n" -"- increase the current buffer's wrap width\n" -"-In the customization layer new settings for the buffer are exposed dealing with wrapping\n" -"-In the customization layer there is a call for setting what keys the GUI should use\n" -"\n" -"New in alpha 4.0.11:\n" -"-The commands for going to next error, previous error, etc now work\n" -" on any buffer with jump locations including *search*\n" -"-4coder now supports proper, borderless, fullscreen with the flag -F\n" -" and fullscreen can be toggled with .\n" -" (This sometimes causes artifacts on the Windows task bar)\n" -"- to exit\n" -"-hook on exit for the customization system\n" -"-tokens now exposed in customization system\n" -"-mouse release events in customization system\n" -"\n" -"New in alpha 4.0.10:\n" -"- list all locations of a string across all open buffers\n" -"-Build now finds build.sh and Makefile on Linux\n" -"- goes to the next error if the *compilation* buffer is open\n" -"- goes to the previous error\n" -"- goes to the first error\n" -"- switch to the compilation buffer\n" -"- close the panel viewing the compilation buffer\n" -"-New documentation for the 4coder string library included in 4coder_API.html\n" -"-Low level allocation calls available in custom API\n" -"-Each panel can change font independently.\n" -" Per-buffer fonts are exposed in the custom API.\n" -"\n" -"New in alpha 4.0.9:\n" -"-A scratch buffer is now opened with 4coder automatically\n" -"-A new mouse suppression mode toggled by \n" -"-Hinting is disabled by default, a -h flag on the command line enables it\n" -"-New 4coder_API.html documentation file provided for the custom layer API\n" -"-Experimental new work-flow for building and jumping to errors\n" -" This system is only for MSVC in the 'power' version as of 4.0.9\n" -"\n" -"New in alpha 4.0.8:\n" -"-Eliminated the parameter stack\n" -"\n" -"New in alpha 4.0.7:\n" -"-Right click sets the mark\n" -"-Clicks now have key codes so they can have events bound in customizations\n" -"- opens a debug view, see more in README.txt\n" -"\n" -"New in alpha 4.0.6:\n" -"-Tied the view scrolling and the list arrow navigation together\n" -"-Scroll bars are now toggleable with for show and for hide\n" -"\n" -"New in alpha 4.0.5:\n" -"-New indent rule\n" -"-app->buffer_compute_cursor in the customization API\n" -"-f keys are available in the customization system now\n" -"\n" -"New in alpha 4.0.3 and 4.0.4:\n" -"-Scroll bar on files and file lists\n" -"-Arrow navigation in lists\n" -"-A new minimal theme editor\n" -"\n" -"New in alpha 4.0.2:\n" -"-The file count limit is over 8 million now\n" -"-File equality is handled better so renamings (such as 'subst') are safe now\n" -"-This buffer will report events including errors that happen in 4coder\n" -"-Super users can post their own messages here with app->print_message\n" -"- centers view on cursor; cmdid_center_view in customization API\n" -"-Set font size on command line with -f N, N = 16 by default\n\n"; - - // App Structs #define DEFAULT_DISPLAY_WIDTH 672 @@ -2247,12 +2054,6 @@ App_Step_Sig(app_step){ } } - // NOTE(allen): initialize message - if (input->first_step){ - String welcome = make_lit_string(messages); - do_feedback_message(system, models, welcome, true); - } - // NOTE(allen): panel resizing switch (vars->state){ case APP_STATE_EDIT: diff --git a/TODO.txt b/TODO.txt deleted file mode 100644 index bd5496d3..00000000 --- a/TODO.txt +++ /dev/null @@ -1,359 +0,0 @@ - -; Started this list on: (18.01.2016)(dd.mm.yyyy) -; This list is an informal todo list, it may very well miss items -; checked or unchecked, that I inted to do some day. It is included -; in the distribution so that you may take a look and see if your -; requested feature is there, and if not, so that you may remind me. -; Cheers everyone! - -; BUGS -; [X] '\t' thing -; [X] smoothness in smoothscrolling isn't very smooth -; [X] examine ctrl left/right "stopspots" again -; [X] whitespace left/right -; [X] token left/right -; [X] white or token left/right -; [X] alphanumeric left/right -; [X] alphanumeric or camel left/right -; [X] jumping to top of buffer when invoking compiler -; [X] don't darken character with cursor ghost -; [X] only shows LOADED when all spelled out -; [X] cursor image is broken -; [X] special characters aren't colored correctly -; [X] screen does not always paint on open -; [X] unimportant flag for buffers so they don't ask to save -; [X] problem with clipping panel -; [X] paste highlight range is wrong -; [X] bug in new file interface -; [X] interactive open shouldn't be case sensitive (esp in windows) -; [X] REOPEN is still disabled! -; [X] lctrl + lalt = AltGr option -; [X] don't cursor ghost search highlights -; [X] auto indent stopped working (maps incorrect in one of the views?) -; [X] Assert(size + buffer->line_count < max) -; [X] unsigned -; [X] shift+backspace in interactive view is messed up -; [X] scrolls with mouse off window -; [X] file open same file/switch to file settings wrong -; [X] show whitespace isn't working -; [X] lexer in 4cpp_config.h -; [X] steady view in two panel editing of same file -; [X] offer error -; [X] switch to file "4ed.cpp" with "win32_4ed.cpp" open -; [X] inserting new line at top of file ~ scrolling jump when window is unaligned -; [X] saving/killing *compilation* doesn't work -; [X] line wrapping also doesn't work -; [X] save as corruptitates the filename -; [X] crash when leaving maximized mode and view get's weird -; [X] decrease scroll speed on short windows -; [X] different files, same live name, big ol' bug nest -; [X] can't open 4coder in arbitrary directory -; [X] shift tab -; [X] after auto indent always put cursor after whitespace -; [X] file menu non-ascii file names -; [X] strip \r in paste -; [X] page up scrolling stuff -; [X] stop spots for camel case aren't super -; [X] unmodified command then get's inserted in new view (z bug from hmh) -; [X] view_id always 1 bug -; [X] interactive kill not working -; [X] mouse not working on interactive view -; [X] reopen effects other view too? -; [X] allen's segfaults on linux launch -; [X] open empty file bug -; [X] chronal's map setting issue -; [X] linux save jankieness -; [X] bouncing when scrolling down -; [X] sometimes the main cursor is not the same width as the mark cursor in the same spot -; [X] tab character wrong width -; [X] miblo's off screen cursor thing -; [X] new file is messed up for code files, it never finishes parsing! -; [X] key presses that should be consumed in the GUI are now passed to the file! -; [X] paste snaps the cursor back into view! -; [X] clean whitespace doesn't appear to be cleaning trailing whitespace anymore??? -; [X] problem with end of line comments -; [X] paths with parens in them -; [X] killing compilation panel changes active panel -; [X] make panel resizing not whacky with child panels -; [X] visual studio file saves aren't picked up by the file track system -; [X] findstr format not quite working -; [X] over left-shifting the view? -; -; [] indication on failure to save -; [] history is broken, revist the entire system -; -; - -; BEFORE I SHIP -; - -; TODOS -; [X] success message when compiler works -; [X] auto-complete -; [X] detect word to match against -; [X] search in file range for next match and use if found -; [X] create repeatable tracker of previous match and files' searched -; [X] more options for getting buffer in custom API -; [X] write to buffer in custom API -; [X] querry buffer string in custom API -; [X] API for file views -; [X] Seek backwards option -; [X] Use range parameters in all applicable commands -; [X] generate enum for key codes -; [X] API for direct input -; [X] Seek string instead of delimiter -; [X] hook parameters -; [X] API based themes -; [X] improve file limit (now is > 8 million I think) -; [X] get key stroke in custom callback -; [X] tab option for auto-indent -; [X] catch unsaved files on close -; [X] feedback messages -; [X] feedback message API -; [X] kill rect -; [X] add high DPI support -; [X] error parsing and jump to error -; [X] manipulate scroll target API -; [X] generate documentation for custom API -; [X] flag in create buffer to prevent making new files -; [X] locking to a view for next position jumping -; [X] break down the build system and get away from the preproc hack -; [X] exit command -; [X] full screen option -; [X] add to APIs -; [X] try to make win32 version better -; [X] don't execute frames on events dealing only with ctrl/alt/shift -; [X] additional hooks -; [X] new file -; [X] hook on exit -; [X] file out of sync -; [X] mouse down/up distinction -; [X] case insensitive interactive switch buffer -; [X] expose dirty flags -; [X] why are command line files not loading any more? -; [X] use strange theme -; [X] cuber's return to previous buffer idea -; [X] find matches for current identifier -; [X] query buffer font info -; [X] issues with drive letters -; [X] ad hoc call for setting up/down keys for interactive screens -; [X] miblo's various number editors -; [X] eliminate the need for the lexer state's spare array. -; [X] fix buffer render item capacity issue -; [X] tab to complete folder names in the new file dialogue -; [X] API docs have duplicate ids? - -; Token related upgrades -; [X] tokens in the custom API -; [X] token seeking on custom side -; [X] auto indent on the custom side -; [X] indent whole comments -; [X] inserting lines at end of block comment -; [] switch to line classification system -; [] more built in options for auto indenting - -; Arbitrary wrap positions -; [X] allow for arbitrary wrap positions independent of view width -; [X] command for adjusting wrap positions in views -; [X] get horizontal scrolling to work in line wrap mode -; [X] word level wrapping -; [X] ability to toggle virtual white space -; [X] home/end should go to the beginning/end of the visual line not the textual line -; [X] code level wrapping level 1 -; [X] handle basic scope indents -; [X] handle parentheses -; [X] handle preprocessor -; [X] unify wrap rule parsing and indent rule parsing -; [X] handle square brackets -; [X] smarter wrap rule -; [X] handle unclosed statements -; [X] wrapped line indication -; [X] special indent rules in preprocessor body -; [X] handle comments -; [X] additional width for nesting? -; [X] fix issues when relexing happens in parallel -; [X] improve code display mode so that it can auto-indent the text on save -; [] command for setting wrap positions in views directly -; [] ability to see the wrap position as a number/line and adjust graphically -; [] code level wrapping level 2 -; [X] comment lead whitespace problem -; [] remeasure version of measure_wraps - -; [] code file outlining -; [] alternate code completion plan - -; Buffer behavior cleanup -; [X] show all characters as \# if they can't be rendered -; [X] get the navigation working correctly around multi-glyph characters -; [] provide full cursor positioning in buffers -; [] provide cursor positioning system that does columns correctly -; [] unicode buffer mode -; [] binary buffer mode -; [] support full length unicode file names - -; [] user file bar string -; [] option to not open *messages* every startup -; [] API docs as text file -; [] read only files -; [] option to hide hidden files -; [] control over how mouse effects panel focus - -; [] option to break buffer name ties by adding parent directories instead of <#> -; [] undo groups -; [] cursor/scroll groups -; [] double binding warnings - -; [] the "main_4coder" experiment -; [] real multi-line editing -; [] multi-cursor editing -; [] matching brace/paren/#if#endif highlighting -; [] word repetition highlighting - -; [] simple text based project file -; [] system commands bound to in project file -; [] ability to save and reopen the window state - -; [] introduce custom command line arguments -; [] control the file opening/start hook relationship better -; [] get keyboard state on launch -; [] never launch two 4coders unless special -R flag is used - -; meta programming system -; [X] condense system into single meta compiler -; [X] formalize the documentation writer so the TOC can be better and so it's easier to shoot off other docs -; [] formalize the rewriter for the 4coder_string.h so it can be used for other single header libs -; [] profile and optimize the current metagen system -; [] expand the use of 4coder_types.h to also allow static variable and function declarations -; [] get more of the helper functions going through the documentation system -; [] method of virtually pulling the documentation line from another item rather than copy-pasting the text. -; - -; GUI related tech -; [] scroll bar options -; [] buffer driven GUI experiment -; - -; search related tech -; [X] replace word (incremental and/or in range) -; [X] caps insensitivety -; [X] improved custom API for text "streams" -; [X] wave search -; [] optimize search -; [] smarter isearch behavior -; [] cleanup word complete so it may be case-insensitive -; - -; theme related business - -; control schemes -; [] emacs style sub-maps -; [] vim keys -; [] sublime style editing -; [] command meta data -; [] macros -; - -; code engine -; [X] lexer with multiple chunk input -; [X] more correct auto-indentation -; [X] switch over to gap buffer -; [] preprocessor -; [] AST generator -; - -; "virtual text" -; [] line numbers -; [] macro expansion -; [] error text at line -; [] word complete ghosting -; [] fancy code presentation mode -; - -; [] switch-case-enum based word complete -; [] keep copy of unedited orignal maybe? (compressed? restore by history?) -; -; [] diff -; [] cloc -; [] regex -; [] explicit panel layout -; [] polish for hot directories -; -; [] tutorials -; [] console emulator -; -; [] 10 GB text file -; - -; INTERNAL TODOS -; [X] switch building non-extensible version by statically linking to custom.cpp -; [X] pack fonts more squarely -; [X] change job canceling to a polling based thing -; [] hashed string pool for clipboard/filenames/etc -; [] new profiling/debugging system -; [] new testing system -; - -; EASY TODOS -; [X] better messages for example not "BEHIND OS" -; [X] shift backspace -; [X] center view on cursor -; [X] delta time in scroll interpolation -; [] panel grow/shrink commands -; - -; HARD BUGS -; [X] reduce cpu consumption -; [X] repainting too slow for resize looks really dumb -; [X] fill screen right away -; [X] minimize and reopen problem (fixed by microsoft patch aparently) -; [] handling cursor in non-client part of window so it doesn't spaz -; -; [] a triangle rendered for a few frames? color of the dirty markers (not reproduced by me yet) -; -; - - -; PORTING TODOS -; [X] command line parameters -; [X] get command line arguments -; [X] user settings file name -; [X] custom DLL -; [X] window size and position / full screen -; [X] file(s) to open initially -; [X] position in file to open -; [X] transition Win32 layer to using system_shared stuff -; [X] event driven file synchronization -; [] user settings file -; [] system fonts -; [] file drag and drop -; [] low latency stuff -; [X] actually write the port -; [X] 4coder code compiling -; [X] opengl window up -; [X] basic versions of system functions -; [X] get 4coder to render to window -; [X] keyboard and mouse input (TY:insofaras) -; [X] file exchange (TY:insofaras) -; [X] clipboard (TY:insofaras) -; [X] background threads (TY:insofaras) -; [X] cli stuff (TY:insofaras) -; [X] event diven file synchronization (TY:insofaras) -; [] system fonts -; [] file drag and drop -; [] allow for multiple clipboards -; [] OS X port -; [X] 4coder code compiling -; [X] opengl window up -; [X] basic versions of system functions -; [X] get 4coder to render to window -; [] keyboard and mouse input -; [] file exchange -; [] clipboard -; [] background threads -; [] cli stuff -; [] event diven file synchronization -; [] system fonts -; [] file drag and drop -; [] allow for multiple clipboards -; - diff --git a/changes.txt b/changes.txt new file mode 100644 index 00000000..8273342d --- /dev/null +++ b/changes.txt @@ -0,0 +1,185 @@ + +New in alpha 4.0.26: + Routine bug fixing... +-Fixed various text input crash bugs +-Fixed load large file crash bug +-Fixed crash in 'list_all_locations_of_type_definition_of_identifier' +-Fixed sticky jump crash +-Fixed line move/delete bugs on last line of file +-Fixed to work on indefinitely long lines +-Fixed jump behavior quirks with parsing and cursor movement +-Fixed rare bug causing copy from other applications to fail on Windows +-Fixed auto indent commands to do a better job picking an anchor for parsing + Testing system now in place (windows only): + Flag -R creates an 'input recording' file of the 4coder session + Flag -T overrides user input and drives input by the input recorded in the specified file + +New in alpha 4.0.25: +-Support for unbounded paste sizes +-Window title now reflects the open project file +-Buffer names resolve with more path information instead of just a counter +-Support for Rust error format and improved autoindenting for Rust +-Work around for bug in make on Windows +-New commands: + show the current buffer in the other panel (side by side) + show the current buffer in the other panel (swap with other buffer) + list all type definition locations of a particular string ~ if only one jump to it instead + list all type definition locations of the token under the cursor ~ if only one jump to it instead +-The indenter no longer does anything to multi-line strings such as raw strings. +-The customization API now has the ability to set the window's title. +-The customization API has a hook for resolving buffer name conflicts. + +New in alpha 4.0.24: +-Fonts can now be loaded from the system API or from the fonts folder +-Fonts can now be resized at run time, hinting can be toggled at run time +-Fonts can now be rendered with any combination of the styles: bold, italic, underline + (That is provided the font supports the style.) +-Now font faces can have different sizes simultaneously, or have the different hinting or styling configurations. +-Lots of new built in commands including: + delete the line under the cursor + duplicate the line under the cursor + move the line under the cursor up + move the line under the cursor down + select surrounding scope in code file + select the next scope up in code file + select the next scope down in code file + if a scope is selected, delete it's braces + if a scope is selected, absorb the statement below it into the scope + + 'delete file' close the current buffer and delete it's physical file + + 'rename file' rename the current buffer's physical file and reopen the buffer with the new file name + + 'mkdir' create a new directory +-The customization API is extended for more explicit font face control. +-The customization API comes with a parser and generator for generating metadata on built in and custom commands. + +New in alpha 4.0.22 and 4.0.23: +-The rendering layer is cleaned up and faster +-4coder can now ship with multiple built in command bindings + New built in binding "mac-default": For the mac version of 4coder - similar to most Mac applications +-Fullscreen now works on Windows without the '-S' flag +-Set up a single 4coder project for Windows/Linux/Mac in one command: -> "new project" + +New in alpha 4.0.21: +-Color schemes are now loaded in theme files from the "themes" folder +-After loading a project sets the hot directory to the project directory +-The flag -L enables a logging system that will collect information in case more information is needed while debugging a problem +-All command line flags after the special flag --custom are now passed to the custom API start hook +-The start hook now gets the list of file names that were specified on the command line + All of the files specified on the command line are loaded before the start hook runs +-It is now possible to set the hot directory from the custom API +-On windows the buildsuper scripts are improved to look for vcvarsall.bat in lots of common locations + +New in alpha 4.0.20: +-Option for LAlt + LCtrl = AltGr on Windows is now in config.4coder +-The 4cpp lexer now has a customizable keyword table, *experimental* expansion of language support to: + Rust, C#, Java + Arbitrary keyword customization available in custom code (super users) + +New in alpha 4.0.19: +-Lexer now handles string literal prefixes and is more optimized +-Fixes for lingering unicode bugs +-Power users have an experimental new jump to error that keeps correct positions through edits (coming to all tiers soon) + +New in alpha 4.0.18: +-Support for rendering unicode characters +- isearch alpha-numeric word under cursor +- query replace alpha-numeric word under cursor +- toggle file bar + +New in alpha 4.0.17:\n" +-New support for extended ascii input. +-Extended ascii encoded in buffers as utf8. +-The custom layer now has a 'markers' API for tracking buffer positions across changes. + +New in alpha 4.0.16: +- If the current file is a C++ code file, this opens the matching header. + If the current file is a C++ header, this opens the matching code file. +-Option to automatically save changes on build in the config file. + This works for builds triggered by . +-Option in project files to have certain fkey commands save changes. + +New in alpha 4.0.15: +- find all functions in the current buffer and list them in a jump buffer +-option to set user name in config.4coder + The user name is used in and comment writing commands + +New in alpha 4.0.14: +-Option to have wrap widths automatically adjust based on average view width +-The 'config.4coder' file can now be placed with the 4ed executable file +-New options in 'config.4coder' to specify the font and color theme +-New built in project configuration system +-New on-save hooks allows custom behavior in the custom layer whenever a file is saved +-When using code wrapping, any saved file is automatically indented in the text format, this option can be turned off in config.4coder + +New in alpha 4.0.12 and 4.0.13: +-Text files wrap lines at whitespace when possible +-New code wrapping feature is on by default +-Introduced a 'config.4coder' for setting several wrapping options: + enable_code_wrapping: set to false if you want the text like behavior + default_wrap_width: the wrap width to set in new files +- decrease the current buffer's wrap width +- increase the current buffer's wrap width +-In the customization layer new settings for the buffer are exposed dealing with wrapping +-In the customization layer there is a call for setting what keys the GUI should use + +New in alpha 4.0.11: +-The commands for going to next error, previous error, etc now work + on any buffer with jump locations including *search* +-4coder now supports proper, borderless, fullscreen with the flag -F + and fullscreen can be toggled with . + (This sometimes causes artifacts on the Windows task bar) +- to exit +-hook on exit for the customization system +-tokens now exposed in customization system +-mouse release events in customization system + +New in alpha 4.0.10: +- list all locations of a string across all open buffers +-Build now finds build.sh and Makefile on Linux +- goes to the next error if the *compilation* buffer is open +- goes to the previous error +- goes to the first error +- switch to the compilation buffer +- close the panel viewing the compilation buffer +-New documentation for the 4coder string library included in 4coder_API.html +-Low level allocation calls available in custom API +-Each panel can change font independently. + Per-buffer fonts are exposed in the custom API. + +New in alpha 4.0.9: +-A scratch buffer is now opened with 4coder automatically +-A new mouse suppression mode toggled by +-Hinting is disabled by default, a -h flag on the command line enables it +-New 4coder_API.html documentation file provided for the custom layer API +-Experimental new work-flow for building and jumping to errors + This system is only for MSVC in the 'power' version as of 4.0.9 + +New in alpha 4.0.8: +-Eliminated the parameter stack + +New in alpha 4.0.7: +-Right click sets the mark +-Clicks now have key codes so they can have events bound in customizations +- opens a debug view, see more in README.txt + +New in alpha 4.0.6: +-Tied the view scrolling and the list arrow navigation together +-Scroll bars are now toggleable with for show and for hide + +New in alpha 4.0.5: +-New indent rule +-app->buffer_compute_cursor in the customization API +-f keys are available in the customization system now + +New in alpha 4.0.3 and 4.0.4: +-Scroll bar on files and file lists +-Arrow navigation in lists +-A new minimal theme editor + +New in alpha 4.0.2: +-The file count limit is over 8 million now +-File equality is handled better so renamings (such as 'subst') are safe now +-This buffer will report events including errors that happen in 4coder +-Super users can post their own messages here with app->print_message +- centers view on cursor; cmdid_center_view in customization API +-Set font size on command line with -f N, N = 16 by default + diff --git a/meta/4ed_build.cpp b/meta/4ed_build.cpp index fd964a64..6b872c5d 100644 --- a/meta/4ed_build.cpp +++ b/meta/4ed_build.cpp @@ -618,9 +618,9 @@ package(char *cdir){ // NOTE(allen): alpha and super builds enum{ - Tier_Alpha, - Tier_Super, - Tier_COUNT + Tier_Alpha = 0, + Tier_Super = 1, + Tier_COUNT = 2 }; char *tiers[] = { "alpha", "super" }; @@ -650,6 +650,7 @@ package(char *cdir){ fm_copy_folder(cdir, dir, "themes"); fm_copy_file(fm_str(cdir, "/LICENSE.txt"), fm_str(dir, "/LICENSE.txt")); fm_copy_file(fm_str(cdir, "/README.txt"), fm_str(dir, "/README.txt")); + fm_copy_file(fm_str(cdir, "/CHANGES.txt"), fm_str(dir, "/CHANGES.txt")); fm_make_folder_if_missing(fonts_dir); fm_copy_all(fonts_source_dir, "*", fonts_dir);