changes to custom file organization

This commit is contained in:
Allen Webster 2016-05-06 12:45:50 -04:00
parent b085323942
commit 5c8d7d8ccb
7 changed files with 7 additions and 78 deletions

View File

@ -1,33 +0,0 @@
// Delete CustomCurrent to define your own customizations or
// set it to one of the preexisting options
#define Custom_Current Custom_Default
#define Custom_Default 1
// The following customization schemes are power users only:
#define Custom_HandmadeHero 2
// TOP
#if Custom_Current == Custom_Default
# include "4coder_default_bindings.cpp"
#elif Custom_Current == Custom_HandmadeHero
# include "power/4coder_casey.cpp"
#endif
extern "C" GET_BINDING_DATA(get_bindings){
Bind_Helper context_actual = begin_bind_helper(data, size);
Bind_Helper *context = &context_actual;
#if Custom_Current == Custom_Default
default_get_bindings(context, true);
#elif Custom_Current == Custom_HandmadeHero
casey_get_bindings(context);
#endif
end_bind_helper(context);
return context->write_total;
}
// BOTTOM

View File

@ -1,7 +1,7 @@
// TOP
#include "4coder_default.cpp"
#include "4coder_default_include.cpp"
unsigned char blink_t = 0;
@ -265,7 +265,7 @@ CUSTOM_COMMAND_SIG(ruin_theme){
app->set_theme_colors(app, colors, count);
}
void default_get_bindings(Bind_Helper *context, int set_hooks){
void get_bindings(Bind_Helper *context, int set_hooks){
// NOTE(allen|a3.1): Hooks have no loyalties to maps. All hooks are global
// and once set they always apply, regardless of what map is active.
if (set_hooks){

View File

@ -15,7 +15,7 @@ pushd ..\code
popd
pushd ..\build
call "..\code\buildsuper.bat" ..\code\4coder_custom.cpp
call "..\code\buildsuper.bat" ..\code\4coder_default_bindings.cpp
set EXPORTS=/EXPORT:app_get_functions
cl %OPTS% %INCLUDES% %DEFINES% ..\code\4ed_app_target.cpp %* /Fe4ed_app /LD /link /INCREMENTAL:NO /OPT:REF %EXPORTS%

View File

@ -5,7 +5,7 @@ IF NOT DEFINED clset (call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\
SET clset=64
SET SRC=%1
if "%SRC%" == "" SET SRC=4coder_custom.cpp
if "%SRC%" == "" SET SRC=4coder_default_bindings.cpp
SET OPTS=/W4 /wd4310 /wd4100 /wd4201 /wd4505 /wd4996 /wd4127 /wd4510 /wd4512 /wd4610 /WX
SET OPTS=%OPTS% /GR- /nologo

View File

@ -11,42 +11,6 @@
merchantability, fitness for a particular purpose, or non-infringement.
*/
/* NOTE(allen): Should be fixed now
- Need file limit to be substantially higher than 128 (65536?)
~ file limit is now over 8 million
- Font size is too big
~ -f N option on command line, default N = 16
- Asking for a buffer to be saved if you have not modified the buffer should not save the
buffer, or perhaps more "safely", it should diff the buffer against the existing on-disk
contents and only save if there is a detected change between them.
- Search:
- Needs to be case-insensitive, or at least have the option to be
- Needs to replace using the case of the thing being replaced, or at least have the option to do so
- Bug with opening too many files where it simply no longer can switch to a buffer at all?
~ I assume this refers to a file limit issue, if not then maybe it's not actually fixed.
- Bug where opening the same buffer with open-file leads to a confusing situation
where you don't know what you're editing or something??
- Bug where replacing v4 with rectangle2 only replaces some instances???
~ For the interested programmer: the range recomputation wasn't working right so it was always
using the original range from cursor to mark. So if the string gets too long later occurances of
v4 get pushed outside of the range.
- Bug in search where extra backspaces after there are no characters yet "remembers"
how many you hit and then eats that many real characters you type?
- Some way to recenter the view so that the line containing the cursor becomes the
center line vertically.
~ cmdid_center_view
- Have buffers normalize slashes to always be forward-slash - right now I'm doing this manually
*/
/* TODO(casey): Here are our current issues
- High priority:
@ -109,7 +73,7 @@
#include <math.h>
#include <stdio.h>
#include "..\4coder_default.cpp"
#include "..\4coder_default_includes.cpp"
enum maps{
my_code_map
@ -1407,13 +1371,11 @@ HOOK_SIG(casey_start)
}
void
casey_get_bindings(Bind_Helper *context)
get_bindings(Bind_Helper *context)
{
set_hook(context, hook_start, casey_start);
set_hook(context, hook_open_file, casey_file_settings);
// TODO(casey): re-enable my scroll once the view_id bug is fixed
set_scroll_rule(context, casey_smooth_scroll_rule);
// set_scroll_rule(context, smooth_scroll_rule);
EnumWindows(win32_find_4coder_window, 0);

View File

@ -26,7 +26,7 @@
#include <stdlib.h>
#include "4coder_custom.cpp"
#include "4coder_default_bindings.cpp"
#undef exec_command
#undef exec_command_keep_stack