4.0.29 Major new features
This commit is contained in:
commit
418b14f092
|
@ -704,11 +704,12 @@ ENUM(int32_t, Marker_Visuals_Type)
|
|||
{
|
||||
BufferMarkersType_Invisible = 0,
|
||||
BufferMarkersType_CharacterBlocks = 1,
|
||||
BufferMarkersType_CharacterHighlightRanges = 2,
|
||||
BufferMarkersType_LineHighlights = 3,
|
||||
BufferMarkersType_CharacterWireFrames = 4,
|
||||
BufferMarkersType_CharacterIBars = 5,
|
||||
BufferMarkersType_COUNT = 6,
|
||||
BufferMarkersType_CharacterWireFrames = 2,
|
||||
BufferMarkersType_CharacterIBars = 3,
|
||||
BufferMarkersType_LineHighlights = 4,
|
||||
BufferMarkersType_CharacterHighlightRanges = 5,
|
||||
BufferMarkersType_LineHighlightRanges = 6,
|
||||
BufferMarkersType_COUNT = 7,
|
||||
};
|
||||
ENUM(uint32_t, Marker_Visuals_Symbolic_Color)
|
||||
{
|
||||
|
@ -727,10 +728,10 @@ STRUCT Marker_Visuals_Take_Rule{
|
|||
int32_t step_stride_in_marker_count;
|
||||
int32_t maximum_number_of_markers;
|
||||
};
|
||||
ENUM(int32_t, Marker_Visuals_Priority_Level){
|
||||
ENUM(uint32_t, Marker_Visuals_Priority_Level){
|
||||
VisualPriority_Lowest = 0,
|
||||
VisualPriority_Low = 1000,
|
||||
VisualPriority_Normal = 2000,
|
||||
VisualPriority_Default = 2000,
|
||||
VisualPriority_High = 3000,
|
||||
VisualPriority_Highest = 4000,
|
||||
};
|
||||
|
@ -989,9 +990,9 @@ TYPEDEF_FUNC int32_t Command_Caller_Hook_Function(struct Application_Links *app,
|
|||
#define COMMAND_CALLER_HOOK(name) int32_t name(struct Application_Links *app, Generic_Command cmd)
|
||||
|
||||
TYPEDEF_FUNC void Render_Callback(struct Application_Links *app);
|
||||
TYPEDEF_FUNC void Render_Caller_Function(struct Application_Links *app, View_ID view_id, Render_Callback *do_core_render);
|
||||
TYPEDEF_FUNC void Render_Caller_Function(struct Application_Links *app, View_ID view_id, Range on_screen_range, Render_Callback *do_core_render);
|
||||
#define RENDER_CALLER_SIG(name) \
|
||||
void name(struct Application_Links *app, View_ID view_id, Render_Callback *do_core_render)
|
||||
void name(struct Application_Links *app, View_ID view_id, Range on_screen_range, Render_Callback *do_core_render)
|
||||
|
||||
TYPEDEF_FUNC int32_t Hook_Function(struct Application_Links *app);
|
||||
#define HOOK_SIG(name) int32_t name(struct Application_Links *app)
|
||||
|
|
|
@ -10,6 +10,7 @@ write_character_parameter(Application_Links *app, uint8_t *character, uint32_t l
|
|||
if (length != 0){
|
||||
uint32_t access = AccessOpen;
|
||||
View_Summary view = get_active_view(app, access);
|
||||
if_view_has_highlighted_range_delete_range(app, view.view_id);
|
||||
|
||||
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
|
||||
int32_t pos = view.cursor.pos;
|
||||
|
@ -57,16 +58,15 @@ CUSTOM_DOC("Deletes the character to the right of the cursor.")
|
|||
{
|
||||
uint32_t access = AccessOpen;
|
||||
View_Summary view = get_active_view(app, access);
|
||||
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
|
||||
|
||||
int32_t start = view.cursor.pos;
|
||||
|
||||
Full_Cursor cursor;
|
||||
view_compute_cursor(app, &view, seek_character_pos(view.cursor.character_pos+1), &cursor);
|
||||
int32_t end = cursor.pos;
|
||||
|
||||
if (0 <= start && start < buffer.size){
|
||||
buffer_replace_range(app, &buffer, start, end, 0, 0);
|
||||
if (!if_view_has_highlighted_range_delete_range(app, view.view_id)){
|
||||
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
|
||||
int32_t start = view.cursor.pos;
|
||||
if (0 <= start && start < buffer.size){
|
||||
Full_Cursor cursor = {0};
|
||||
view_compute_cursor(app, &view, seek_character_pos(view.cursor.character_pos + 1), &cursor);
|
||||
int32_t end = cursor.pos;
|
||||
buffer_replace_range(app, &buffer, start, end, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,17 +75,16 @@ CUSTOM_DOC("Deletes the character to the left of the cursor.")
|
|||
{
|
||||
uint32_t access = AccessOpen;
|
||||
View_Summary view = get_active_view(app, access);
|
||||
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
|
||||
|
||||
int32_t end = view.cursor.pos;
|
||||
|
||||
Full_Cursor cursor;
|
||||
view_compute_cursor(app, &view, seek_character_pos(view.cursor.character_pos-1), &cursor);
|
||||
int32_t start = cursor.pos;
|
||||
|
||||
if (0 < end && end <= buffer.size){
|
||||
buffer_replace_range(app, &buffer, start, end, 0, 0);
|
||||
view_set_cursor(app, &view, seek_character_pos(view.cursor.character_pos-1), true);
|
||||
if (!if_view_has_highlighted_range_delete_range(app, view.view_id)){
|
||||
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
|
||||
int32_t end = view.cursor.pos;
|
||||
if (0 < end && end <= buffer.size){
|
||||
Full_Cursor cursor = {0};
|
||||
view_compute_cursor(app, &view, seek_character_pos(view.cursor.character_pos - 1), &cursor);
|
||||
int32_t start = cursor.pos;
|
||||
buffer_replace_range(app, &buffer, start, end, 0, 0);
|
||||
view_set_cursor(app, &view, seek_character_pos(view.cursor.character_pos - 1), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -93,7 +92,6 @@ CUSTOM_COMMAND_SIG(set_mark)
|
|||
CUSTOM_DOC("Sets the mark to the current position of the cursor.")
|
||||
{
|
||||
View_Summary view = get_active_view(app, AccessProtected);
|
||||
|
||||
view_set_mark(app, &view, seek_pos(view.cursor.pos));
|
||||
view_set_cursor(app, &view, seek_pos(view.cursor.pos), 1);
|
||||
}
|
||||
|
@ -102,10 +100,8 @@ CUSTOM_COMMAND_SIG(cursor_mark_swap)
|
|||
CUSTOM_DOC("Swaps the position of the cursor and the mark.")
|
||||
{
|
||||
View_Summary view = get_active_view(app, AccessProtected);
|
||||
|
||||
int32_t cursor = view.cursor.pos;
|
||||
int32_t mark = view.mark.pos;
|
||||
|
||||
view_set_cursor(app, &view, seek_pos(mark), true);
|
||||
view_set_mark(app, &view, seek_pos(cursor));
|
||||
}
|
||||
|
@ -116,7 +112,6 @@ CUSTOM_DOC("Deletes the text in the range between the cursor and the mark.")
|
|||
uint32_t access = AccessOpen;
|
||||
View_Summary view = get_active_view(app, access);
|
||||
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
|
||||
|
||||
Range range = get_view_range(&view);
|
||||
buffer_replace_range(app, &buffer, range.min, range.max, 0, 0);
|
||||
}
|
||||
|
@ -200,20 +195,22 @@ CUSTOM_DOC("Sets the cursor position to the mouse position.")
|
|||
if (global_point_to_view_point(&view, mouse.x, mouse.y, &rx, &ry)){
|
||||
view_set_cursor(app, &view, seek_xy(rx, ry, true, view.unwrapped_lines), true);
|
||||
}
|
||||
no_mark_snap_to_cursor(app, view.view_id);
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(click_set_cursor_if_lbutton)
|
||||
CUSTOM_DOC("If the mouse left button is pressed, sets the cursor position to the mouse position.")
|
||||
{
|
||||
View_Summary view = get_active_view(app, AccessProtected);
|
||||
Mouse_State mouse = get_mouse_state(app);
|
||||
if (mouse.l){
|
||||
View_Summary view = get_active_view(app, AccessProtected);
|
||||
float rx = 0;
|
||||
float ry = 0;
|
||||
if (global_point_to_view_point(&view, mouse.x, mouse.y, &rx, &ry)){
|
||||
view_set_cursor(app, &view, seek_xy(rx, ry, true, view.unwrapped_lines), true);
|
||||
}
|
||||
}
|
||||
no_mark_snap_to_cursor(app, view.view_id);
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(click_set_mark)
|
||||
|
@ -226,6 +223,7 @@ CUSTOM_DOC("Sets the mark position to the mouse position.")
|
|||
if (global_point_to_view_point(&view, mouse.x, mouse.y, &rx, &ry)){
|
||||
view_set_mark(app, &view, seek_xy(rx, ry, true, view.unwrapped_lines));
|
||||
}
|
||||
no_mark_snap_to_cursor(app, view.view_id);
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(mouse_wheel_scroll)
|
||||
|
@ -266,6 +264,8 @@ move_vertical(Application_Links *app, float line_multiplier){
|
|||
view_set_scroll(app, &view, new_scroll_vars);
|
||||
}
|
||||
}
|
||||
|
||||
no_mark_snap_to_cursor_if_shift(app, view.view_id);
|
||||
}
|
||||
|
||||
static float
|
||||
|
@ -346,6 +346,7 @@ CUSTOM_DOC("Moves the cursor one character to the left.")
|
|||
View_Summary view = get_active_view(app, access);
|
||||
int32_t new_pos = view.cursor.character_pos - 1;
|
||||
view_set_cursor(app, &view, seek_character_pos(new_pos), 1);
|
||||
no_mark_snap_to_cursor_if_shift(app, view.view_id);
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(move_right)
|
||||
|
@ -355,6 +356,7 @@ CUSTOM_DOC("Moves the cursor one character to the right.")
|
|||
View_Summary view = get_active_view(app, access);
|
||||
int32_t new_pos = view.cursor.character_pos + 1;
|
||||
view_set_cursor(app, &view, seek_character_pos(new_pos), 1);
|
||||
no_mark_snap_to_cursor_if_shift(app, view.view_id);
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(select_all)
|
||||
|
@ -364,6 +366,7 @@ CUSTOM_DOC("Puts the cursor at the top of the file, and the mark at the bottom o
|
|||
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessProtected);
|
||||
view_set_cursor(app, &view, seek_pos(0), true);
|
||||
view_set_mark(app, &view, seek_pos(buffer.size));
|
||||
no_mark_snap_to_cursor(app, view.view_id);
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
|
@ -690,19 +693,16 @@ isearch(Application_Links *app, bool32 start_reversed, String query_init, bool32
|
|||
|
||||
bool32 first_step = true;
|
||||
|
||||
Theme_Color color = {0};
|
||||
color.tag = Stag_Highlight;
|
||||
get_theme_colors(app, &color, 1);
|
||||
|
||||
Managed_Scope view_scope = view_get_managed_scope(app, view.view_id);
|
||||
Managed_Object highlight = alloc_buffer_markers_on_buffer(app, buffer.buffer_id, 2, &view_scope);
|
||||
Marker_Visuals_Type marker_type = BufferMarkersType_CharacterHighlightRanges;
|
||||
Marker_Visuals visuals = create_marker_visuals(app, highlight);
|
||||
marker_visuals_set_look(app, visuals, marker_type, color.color, SymbolicColor_Default, 0);
|
||||
marker_visuals_set_look(app, visuals,
|
||||
BufferMarkersType_CharacterHighlightRanges,
|
||||
SymbolicColorFromPalette(Stag_Highlight),
|
||||
SymbolicColorFromPalette(Stag_At_Highlight), 0);
|
||||
marker_visuals_set_view_key(app, visuals, view.view_id);
|
||||
isearch__update_highlight(app, &view, highlight, match.start, match.end);
|
||||
int32_t original_cursor_render_mode = cursor_render_mode;
|
||||
cursor_render_mode = CursorRenderMode_Hidden;
|
||||
cursor_is_hidden = true;
|
||||
|
||||
User_Input in = {0};
|
||||
for (;;){
|
||||
|
@ -839,8 +839,7 @@ isearch(Application_Links *app, bool32 start_reversed, String query_init, bool32
|
|||
}
|
||||
|
||||
managed_object_free(app, highlight);
|
||||
|
||||
cursor_render_mode = original_cursor_render_mode;
|
||||
cursor_is_hidden = false;
|
||||
|
||||
if (in.abort){
|
||||
String previous_isearch_query_str = make_fixed_width_string(previous_isearch_query);
|
||||
|
@ -931,15 +930,26 @@ query_replace_base(Application_Links *app, View_Summary *view, Buffer_Summary *b
|
|||
int32_t new_pos = 0;
|
||||
buffer_seek_string_forward(app, buffer, pos, 0, r.str, r.size, &new_pos);
|
||||
|
||||
Managed_Scope view_scope = view_get_managed_scope(app, view->view_id);
|
||||
Managed_Object highlight = alloc_buffer_markers_on_buffer(app, buffer->buffer_id, 2, &view_scope);
|
||||
Marker_Visuals visuals = create_marker_visuals(app, highlight);
|
||||
marker_visuals_set_look(app, visuals,
|
||||
BufferMarkersType_CharacterHighlightRanges,
|
||||
SymbolicColorFromPalette(Stag_Highlight),
|
||||
SymbolicColorFromPalette(Stag_At_Highlight), 0);
|
||||
marker_visuals_set_view_key(app, visuals, view->view_id);
|
||||
cursor_is_hidden = true;
|
||||
|
||||
User_Input in = {0};
|
||||
for (;new_pos < buffer->size;){
|
||||
Range match = make_range(new_pos, new_pos + r.size);
|
||||
view_set_highlight(app, view, match.min, match.max, 1);
|
||||
isearch__update_highlight(app, view, highlight, match.min, match.max);
|
||||
|
||||
in = get_user_input(app, EventOnAnyKey, EventOnButton);
|
||||
if (in.abort || in.key.keycode == key_esc || !key_is_unmodified(&in.key)) break;
|
||||
if (in.abort || in.key.keycode == key_esc || !key_is_unmodified(&in.key)) break;
|
||||
|
||||
if (in.key.character == 'y' || in.key.character == 'Y' || in.key.character == '\n' || in.key.character == '\t'){
|
||||
if (in.key.character == 'y' || in.key.character == 'Y' ||
|
||||
in.key.character == '\n' || in.key.character == '\t'){
|
||||
buffer_replace_range(app, buffer, match.min, match.max, w.str, w.size);
|
||||
pos = match.start + w.size;
|
||||
}
|
||||
|
@ -950,8 +960,12 @@ query_replace_base(Application_Links *app, View_Summary *view, Buffer_Summary *b
|
|||
buffer_seek_string_forward(app, buffer, pos, 0, r.str, r.size, &new_pos);
|
||||
}
|
||||
|
||||
view_set_highlight(app, view, 0, 0, 0);
|
||||
if (in.abort) return;
|
||||
managed_object_free(app, highlight);
|
||||
cursor_is_hidden = false;
|
||||
|
||||
if (in.abort){
|
||||
return;
|
||||
}
|
||||
|
||||
view_set_cursor(app, view, seek_pos(pos), true);
|
||||
}
|
||||
|
@ -971,7 +985,9 @@ query_replace_parameter(Application_Links *app, String replace_str, int32_t star
|
|||
with.prompt = make_lit_string("With: ");
|
||||
with.string = make_fixed_width_string(with_space);
|
||||
|
||||
if (!query_user_string(app, &with)) return;
|
||||
if (!query_user_string(app, &with)){
|
||||
return;
|
||||
}
|
||||
|
||||
String r = replace.string;
|
||||
String w = with.string;
|
||||
|
@ -997,13 +1013,17 @@ CUSTOM_DOC("Queries the user for two strings, and incrementally replaces every o
|
|||
return;
|
||||
}
|
||||
|
||||
Query_Bar replace;
|
||||
Query_Bar replace = {0};
|
||||
char replace_space[1024];
|
||||
replace.prompt = make_lit_string("Replace: ");
|
||||
replace.string = make_fixed_width_string(replace_space);
|
||||
|
||||
if (!query_user_string(app, &replace)) return;
|
||||
if (replace.string.size == 0) return;
|
||||
if (!query_user_string(app, &replace)){
|
||||
return;
|
||||
}
|
||||
if (replace.string.size == 0){
|
||||
return;
|
||||
}
|
||||
|
||||
query_replace_parameter(app, replace.string, view.cursor.pos, false);
|
||||
}
|
||||
|
|
|
@ -50,6 +50,9 @@ CUSTOM_DOC("At the cursor, insert the text at the top of the clipboard.")
|
|||
int32_t count = clipboard_count(app, 0);
|
||||
if (count > 0){
|
||||
View_Summary view = get_active_view(app, access);
|
||||
if_view_has_highlighted_range_delete_range(app, view.view_id);
|
||||
view = get_view(app, view.view_id, access);
|
||||
|
||||
Managed_Scope scope = view_get_managed_scope(app, view.view_id);
|
||||
managed_variable_set(app, scope, view_next_rewrite_loc, RewritePaste);
|
||||
int32_t paste_index = 0;
|
||||
|
@ -57,12 +60,11 @@ CUSTOM_DOC("At the cursor, insert the text at the top of the clipboard.")
|
|||
|
||||
int32_t len = clipboard_index(app, 0, paste_index, 0, 0);
|
||||
char *str = 0;
|
||||
|
||||
if (len <= app->memory_size){
|
||||
str = (char*)app->memory;
|
||||
}
|
||||
|
||||
if (str){
|
||||
if (str != 0){
|
||||
clipboard_index(app, 0, paste_index, str, len);
|
||||
|
||||
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
|
||||
|
@ -72,7 +74,7 @@ CUSTOM_DOC("At the cursor, insert the text at the top of the clipboard.")
|
|||
view_set_cursor(app, &view, seek_pos(pos + len), true);
|
||||
|
||||
// TODO(allen): Send this to all views.
|
||||
Theme_Color paste;
|
||||
Theme_Color paste = {0};
|
||||
paste.tag = Stag_Paste;
|
||||
get_theme_colors(app, &paste, 1);
|
||||
view_post_fade(app, &view, 0.667f, pos, pos + len, paste.color);
|
||||
|
@ -88,6 +90,7 @@ CUSTOM_DOC("If the previous command was paste or paste_next, replaces the paste
|
|||
if (count > 0){
|
||||
View_Summary view = get_active_view(app, access);
|
||||
Managed_Scope scope = view_get_managed_scope(app, view.view_id);
|
||||
no_mark_snap_to_cursor(app, scope);
|
||||
|
||||
uint64_t rewrite = 0;
|
||||
managed_variable_get(app, scope, view_rewrite_loc, &rewrite);
|
||||
|
@ -116,7 +119,7 @@ CUSTOM_DOC("If the previous command was paste or paste_next, replaces the paste
|
|||
view_set_cursor(app, &view, seek_pos(pos + len), true);
|
||||
|
||||
// TODO(allen): Send this to all views.
|
||||
Theme_Color paste;
|
||||
Theme_Color paste = {0};
|
||||
paste.tag = Stag_Paste;
|
||||
get_theme_colors(app, &paste, 1);
|
||||
view_post_fade(app, &view, 0.667f, pos, pos + len, paste.color);
|
||||
|
|
|
@ -1274,6 +1274,20 @@ change_mapping(Application_Links *app, String mapping){
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
change_mode(Application_Links *app, String mode){
|
||||
fcoder_mode = FCoderMode_Original;
|
||||
if (match(mode, "4coder")){
|
||||
fcoder_mode = FCoderMode_Original;
|
||||
}
|
||||
else if (match(mode, "notepad-like")){
|
||||
begin_notepad_mode(app);
|
||||
}
|
||||
else{
|
||||
print_message(app, literal("Unknown mode.\n"));
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
static Cpp_Token_Array
|
||||
|
@ -1328,8 +1342,16 @@ config_init_default(Config_Data *config){
|
|||
config->current_mapping = make_fixed_width_string(config->current_mapping_space);
|
||||
copy(&config->current_mapping, "");
|
||||
|
||||
config->mode = make_fixed_width_string(config->mode_space);
|
||||
copy(&config->mode, "4coder");
|
||||
|
||||
config->use_scroll_bars = false;
|
||||
config->use_file_bars = true;
|
||||
config->use_line_highlight = true;
|
||||
config->use_scope_highlight = true;
|
||||
config->use_paren_helper = true;
|
||||
config->use_comment_keyword = true;
|
||||
|
||||
config->enable_virtual_whitespace = true;
|
||||
config->enable_code_wrapping = true;
|
||||
config->automatically_adjust_wrapping = true;
|
||||
|
@ -1388,8 +1410,17 @@ config_parse__data(Partition *arena, String file_name, String data, Config_Data
|
|||
config_fixed_string_var(parsed, "mapping", 0,
|
||||
&config->current_mapping, config->current_mapping_space);
|
||||
|
||||
config_fixed_string_var(parsed, "mode", 0,
|
||||
&config->mode, config->mode_space);
|
||||
|
||||
config_bool_var(parsed, "use_scroll_bars", 0, &config->use_scroll_bars);
|
||||
config_bool_var(parsed, "use_file_bars", 0, &config->use_file_bars);
|
||||
config_bool_var(parsed, "use_line_highlight", 0, &config->use_line_highlight);
|
||||
config_bool_var(parsed, "use_scope_highlight", 0, &config->use_scope_highlight);
|
||||
config_bool_var(parsed, "use_paren_helper", 0, &config->use_paren_helper);
|
||||
config_bool_var(parsed, "use_comment_keyword", 0, &config->use_comment_keyword);
|
||||
|
||||
|
||||
config_bool_var(parsed, "enable_virtual_whitespace", 0, &config->enable_virtual_whitespace);
|
||||
config_bool_var(parsed, "enable_code_wrapping", 0, &config->enable_code_wrapping);
|
||||
config_bool_var(parsed, "automatically_adjust_wrapping", 0, &config->automatically_adjust_wrapping);
|
||||
|
@ -1599,8 +1630,15 @@ load_config_and_apply(Application_Links *app, Partition *scratch, Config_Data *c
|
|||
config_feedback_extension_list(&space, "treat_as_code", &config->code_exts);
|
||||
config_feedback_string(&space, "current_mapping", config->current_mapping);
|
||||
|
||||
config_feedback_string(&space, "mode", config->mode);
|
||||
|
||||
config_feedback_bool(&space, "use_scroll_bars", config->use_scroll_bars);
|
||||
config_feedback_bool(&space, "use_file_bars", config->use_file_bars);
|
||||
config_feedback_bool(&space, "use_line_highlight", config->use_line_highlight);
|
||||
config_feedback_bool(&space, "use_scope_highlight", config->use_scope_highlight);
|
||||
config_feedback_bool(&space, "use_paren_helper", config->use_paren_helper);
|
||||
config_feedback_bool(&space, "use_comment_keyword", config->use_comment_keyword);
|
||||
|
||||
config_feedback_bool(&space, "enable_virtual_whitespace", config->enable_virtual_whitespace);
|
||||
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);
|
||||
|
@ -1635,6 +1673,11 @@ load_config_and_apply(Application_Links *app, Partition *scratch, Config_Data *c
|
|||
|
||||
// Apply config
|
||||
change_mapping(app, config->current_mapping);
|
||||
change_mode(app, config->mode);
|
||||
highlight_line_at_cursor = config->use_line_highlight;
|
||||
do_matching_enclosure_highlight = config->use_scope_highlight;
|
||||
do_matching_paren_highlight = config->use_paren_helper;
|
||||
do_colored_comment_keywords = config->use_comment_keyword;
|
||||
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);
|
||||
|
||||
|
|
|
@ -199,8 +199,16 @@ struct Config_Data{
|
|||
char current_mapping_space[256];
|
||||
String current_mapping;
|
||||
|
||||
char mode_space[64];
|
||||
String mode;
|
||||
|
||||
bool32 use_scroll_bars;
|
||||
bool32 use_file_bars;
|
||||
bool32 use_line_highlight;
|
||||
bool32 use_scope_highlight;
|
||||
bool32 use_paren_helper;
|
||||
bool32 use_comment_keyword;
|
||||
|
||||
bool32 enable_virtual_whitespace;
|
||||
bool32 enable_code_wrapping;
|
||||
bool32 automatically_indent_text_on_save;
|
||||
|
|
|
@ -249,16 +249,16 @@ CUSTOM_DOC("Toggles the mouse suppression mode, see suppress_mouse and allow_mou
|
|||
set_mouse_suppression(app, !suppressing_mouse);
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(disable_highlight_line_at_cursor)
|
||||
CUSTOM_DOC("Disables the line highlight at the cursor.")
|
||||
CUSTOM_COMMAND_SIG(set_mode_to_original)
|
||||
CUSTOM_DOC("Sets the edit mode to 4coder original.")
|
||||
{
|
||||
highlight_line_at_cursor = false;
|
||||
fcoder_mode = FCoderMode_Original;
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(enable_highlight_line_at_cursor)
|
||||
CUSTOM_DOC("Enables the line highlight at the cursor.")
|
||||
CUSTOM_COMMAND_SIG(set_mode_to_notepad_like)
|
||||
CUSTOM_DOC("Sets the edit mode to Notepad like.")
|
||||
{
|
||||
highlight_line_at_cursor = true;
|
||||
begin_notepad_mode(app);
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(toggle_highlight_line_at_cursor)
|
||||
|
@ -267,6 +267,18 @@ CUSTOM_DOC("Toggles the line highlight at the cursor.")
|
|||
highlight_line_at_cursor = !highlight_line_at_cursor;
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(toggle_highlight_enclosing_scopes)
|
||||
CUSTOM_DOC("In code files scopes surrounding the cursor are highlighted with distinguishing colors.")
|
||||
{
|
||||
do_matching_enclosure_highlight = !do_matching_enclosure_highlight;
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(toggle_paren_matching_helper)
|
||||
CUSTOM_DOC("In code files matching parentheses pairs are colored with distinguishing colors.")
|
||||
{
|
||||
do_matching_paren_highlight = !do_matching_paren_highlight;
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(toggle_fullscreen)
|
||||
CUSTOM_DOC("Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.")
|
||||
{
|
||||
|
@ -313,10 +325,11 @@ default_4coder_initialize(Application_Links *app, int32_t override_font_size, bo
|
|||
load_folder_of_themes_into_live_set(app, &global_part, "themes");
|
||||
load_config_and_apply(app, &global_part, &global_config, override_font_size, override_hinting);
|
||||
|
||||
view_rewrite_loc = managed_variable_create_or_get_id(app, "DEFAULT.rewrite" , (uint64_t)0);
|
||||
view_next_rewrite_loc = managed_variable_create_or_get_id(app, "DEFAULT.next_rewrite", (uint64_t)0);
|
||||
view_paste_index_loc = managed_variable_create_or_get_id(app, "DEFAULT.paste_index" , (uint64_t)0);
|
||||
view_is_passive_loc = managed_variable_create_or_get_id(app, "DEFAULT.is_passive" , (uint64_t)false);
|
||||
view_rewrite_loc = managed_variable_create_or_get_id(app, "DEFAULT.rewrite" , 0);
|
||||
view_next_rewrite_loc = managed_variable_create_or_get_id(app, "DEFAULT.next_rewrite" , 0);
|
||||
view_paste_index_loc = managed_variable_create_or_get_id(app, "DEFAULT.paste_index" , 0);
|
||||
view_is_passive_loc = managed_variable_create_or_get_id(app, "DEFAULT.is_passive" , 0);
|
||||
view_snap_mark_to_cursor = managed_variable_create_or_get_id(app, "DEFAULT.mark_to_cursor", 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -38,23 +38,26 @@ static Managed_Variable_ID view_rewrite_loc = 0;
|
|||
static Managed_Variable_ID view_next_rewrite_loc = 0;
|
||||
static Managed_Variable_ID view_paste_index_loc = 0;
|
||||
static Managed_Variable_ID view_is_passive_loc = 0;
|
||||
|
||||
static Managed_Variable_ID view_snap_mark_to_cursor = 0;
|
||||
|
||||
static char out_buffer_space[1024];
|
||||
static char command_space[1024];
|
||||
static char hot_directory_space[1024];
|
||||
|
||||
|
||||
static bool32 highlight_line_at_cursor = false;
|
||||
static bool32 highlight_line_at_cursor = true;
|
||||
static bool32 do_matching_enclosure_highlight = true;
|
||||
static bool32 do_matching_paren_highlight = true;
|
||||
static bool32 do_colored_comment_keywords = true;
|
||||
static bool32 suppressing_mouse = false;
|
||||
|
||||
enum{
|
||||
CursorRenderMode_Hidden = 0,
|
||||
CursorRenderMode_BlockCursorAndWireMark = 1,
|
||||
CursorRenderMode_IBarOrHighlightRange = 2,
|
||||
};
|
||||
static int32_t cursor_render_mode = CursorRenderMode_IBarOrHighlightRange;
|
||||
static bool32 cursor_is_hidden = false;
|
||||
|
||||
enum{
|
||||
FCoderMode_Original = 0,
|
||||
FCoderMode_NotepadLike = 1,
|
||||
};
|
||||
static int32_t fcoder_mode = FCoderMode_NotepadLike;
|
||||
|
||||
static ID_Line_Column_Jump_Location prev_location = {0};
|
||||
|
||||
|
|
|
@ -44,13 +44,125 @@ COMMAND_CALLER_HOOK(default_command_caller){
|
|||
View_Summary view = get_active_view(app, AccessAll);
|
||||
Managed_Scope scope = view_get_managed_scope(app, view.view_id);
|
||||
managed_variable_set(app, scope, view_next_rewrite_loc, 0);
|
||||
if (fcoder_mode == FCoderMode_NotepadLike){
|
||||
managed_variable_set(app, scope, view_snap_mark_to_cursor, true);
|
||||
}
|
||||
exec_command(app, cmd);
|
||||
uint64_t next_rewrite = 0;
|
||||
managed_variable_get(app, scope, view_next_rewrite_loc, &next_rewrite);
|
||||
managed_variable_set(app, scope, view_rewrite_loc, next_rewrite);
|
||||
if (fcoder_mode == FCoderMode_NotepadLike){
|
||||
uint64_t val = 0;
|
||||
if (managed_variable_get(app, scope, view_snap_mark_to_cursor, &val)){
|
||||
if (val != 0){
|
||||
view = get_view(app, view.view_id, AccessAll);
|
||||
view_set_mark(app, &view, seek_pos(view.cursor.pos));
|
||||
}
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
struct Highlight_Record{
|
||||
int32_t first;
|
||||
int32_t one_past_last;
|
||||
int_color color;
|
||||
};
|
||||
|
||||
static void
|
||||
sort_highlight_record(Highlight_Record *records, int32_t first, int32_t one_past_last){
|
||||
if (first + 1 < one_past_last){
|
||||
int32_t pivot_index = one_past_last - 1;
|
||||
int_color pivot_color = records[pivot_index].color;
|
||||
int32_t j = first;
|
||||
for (int32_t i = first; i < pivot_index; i += 1){
|
||||
int_color color = records[i].color;
|
||||
if (color < pivot_color){
|
||||
Swap(Highlight_Record, records[i], records[j]);
|
||||
j += 1;
|
||||
}
|
||||
}
|
||||
Swap(Highlight_Record, records[pivot_index], records[j]);
|
||||
pivot_index = j;
|
||||
|
||||
sort_highlight_record(records, first, pivot_index);
|
||||
sort_highlight_record(records, pivot_index + 1, one_past_last);
|
||||
}
|
||||
}
|
||||
|
||||
static Range_Array
|
||||
get_enclosure_ranges(Application_Links *app, Partition *part,
|
||||
Buffer_Summary *buffer, int32_t pos, uint32_t flags){
|
||||
Range_Array array = {0};
|
||||
array.ranges = push_array(part, Range, 0);
|
||||
for (;;){
|
||||
Range range = {0};
|
||||
if (find_scope_range(app, buffer, pos, &range, flags)){
|
||||
Range *r = push_array(part, Range, 1);
|
||||
*r = range;
|
||||
pos = range.first;
|
||||
}
|
||||
else{
|
||||
break;
|
||||
}
|
||||
}
|
||||
array.count = (int32_t)(push_array(part, Range, 0) - array.ranges);
|
||||
return(array);
|
||||
}
|
||||
|
||||
static void
|
||||
mark_enclosures(Application_Links *app, Partition *scratch, Managed_Scope render_scope,
|
||||
Buffer_Summary *buffer, int32_t pos, uint32_t flags,
|
||||
Marker_Visuals_Type type,
|
||||
int_color *back_colors, int_color *fore_colors, int32_t color_count){
|
||||
Temp_Memory temp = begin_temp_memory(scratch);
|
||||
Range_Array ranges = get_enclosure_ranges(app, scratch,
|
||||
buffer, pos, flags);
|
||||
|
||||
if (ranges.count > 0){
|
||||
int32_t marker_count = ranges.count*2;
|
||||
Marker *markers = push_array(scratch, Marker, marker_count);
|
||||
Marker *marker = markers;
|
||||
Range *range = ranges.ranges;
|
||||
for (int32_t i = 0;
|
||||
i < ranges.count;
|
||||
i += 1, range += 1, marker += 2){
|
||||
marker[0].pos = range->first;
|
||||
marker[1].pos = range->one_past_last - 1;
|
||||
}
|
||||
Managed_Object o = alloc_buffer_markers_on_buffer(app, buffer->buffer_id, marker_count, &render_scope);
|
||||
managed_object_store_data(app, o, 0, marker_count, markers);
|
||||
|
||||
Marker_Visuals_Take_Rule take_rule = {0};
|
||||
take_rule.take_count_per_step = 2;
|
||||
take_rule.step_stride_in_marker_count = 8;
|
||||
|
||||
int32_t first_color_index = (ranges.count - 1)%color_count;
|
||||
for (int32_t i = 0, color_index = first_color_index;
|
||||
i < color_count;
|
||||
i += 1){
|
||||
Marker_Visuals visuals = create_marker_visuals(app, o);
|
||||
int_color back = SymbolicColor_Transparent;
|
||||
int_color fore = SymbolicColor_Default;
|
||||
if (back_colors != 0){
|
||||
back = back_colors[color_index];
|
||||
}
|
||||
if (fore_colors != 0){
|
||||
fore = fore_colors[color_index];
|
||||
}
|
||||
marker_visuals_set_look(app, visuals, type, back, fore, 0);
|
||||
take_rule.first_index = i*2;
|
||||
marker_visuals_set_take_rule(app, visuals, take_rule);
|
||||
color_index = color_index - 1;
|
||||
if (color_index < 0){
|
||||
color_index += color_count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
end_temp_memory(temp);
|
||||
}
|
||||
|
||||
RENDER_CALLER_SIG(default_render_caller){
|
||||
View_Summary view = get_view(app, view_id, AccessAll);
|
||||
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessAll);
|
||||
|
@ -62,62 +174,147 @@ RENDER_CALLER_SIG(default_render_caller){
|
|||
render_scope = create_user_managed_scope(app);
|
||||
}
|
||||
|
||||
// NOTE(allen): Cursor and mark
|
||||
switch (cursor_render_mode){
|
||||
case CursorRenderMode_BlockCursorAndWireMark:
|
||||
{
|
||||
Theme_Color colors[2] = {0};
|
||||
colors[0].tag = Stag_Cursor;
|
||||
colors[1].tag = Stag_Mark;
|
||||
get_theme_colors(app, colors, 2);
|
||||
uint32_t cursor_color = colors[0].color;
|
||||
uint32_t mark_color = colors[1].color;
|
||||
{
|
||||
Managed_Object o = alloc_buffer_markers_on_buffer(app, buffer.buffer_id, 1, &render_scope);
|
||||
Marker marker = {0};
|
||||
marker.pos = view.cursor.pos;
|
||||
managed_object_store_data(app, o, 0, 1, &marker);
|
||||
Marker_Visuals_Type type = is_active_view?BufferMarkersType_CharacterBlocks:BufferMarkersType_CharacterWireFrames;
|
||||
Marker_Visuals visuals = create_marker_visuals(app, o);
|
||||
marker_visuals_set_look(app, visuals, type, cursor_color, SymbolicColor_Default, 0);
|
||||
}
|
||||
{
|
||||
Managed_Object o = alloc_buffer_markers_on_buffer(app, buffer.buffer_id, 1, &render_scope);
|
||||
Marker marker = {0};
|
||||
marker.pos = view.mark.pos;
|
||||
managed_object_store_data(app, o, 0, 1, &marker);
|
||||
Marker_Visuals visuals = create_marker_visuals(app, o);
|
||||
marker_visuals_set_look(app, visuals, BufferMarkersType_CharacterWireFrames, mark_color, SymbolicColor_Default, 0);
|
||||
}
|
||||
}break;
|
||||
Partition *scratch = &global_part;
|
||||
|
||||
// NOTE(allen): Scan for TODOs and NOTEs
|
||||
{
|
||||
Theme_Color colors[2];
|
||||
colors[0].tag = Stag_Text_Cycle_2;
|
||||
colors[1].tag = Stag_Text_Cycle_1;
|
||||
get_theme_colors(app, colors, 2);
|
||||
|
||||
case CursorRenderMode_IBarOrHighlightRange:
|
||||
{
|
||||
Theme_Color colors[2] = {0};
|
||||
colors[0].tag = Stag_Cursor;
|
||||
colors[1].tag = Stag_Highlight;
|
||||
get_theme_colors(app, colors, 2);
|
||||
uint32_t cursor_color = colors[0].color;
|
||||
uint32_t highlight_color = colors[1].color;
|
||||
Temp_Memory temp = begin_temp_memory(scratch);
|
||||
int32_t text_size = on_screen_range.one_past_last - on_screen_range.first;
|
||||
char *text = push_array(scratch, char, text_size);
|
||||
buffer_read_range(app, &buffer, on_screen_range.first, on_screen_range.one_past_last, text);
|
||||
|
||||
Highlight_Record *records = push_array(scratch, Highlight_Record, 0);
|
||||
String tail = make_string(text, text_size);
|
||||
for (int32_t i = 0; i < text_size; tail.str += 1, tail.size -= 1, i += 1){
|
||||
if (match_part(tail, make_lit_string("NOTE"))){
|
||||
Highlight_Record *record = push_array(scratch, Highlight_Record, 1);
|
||||
record->first = i + on_screen_range.first;
|
||||
record->one_past_last = record->first + 4;
|
||||
record->color = colors[0].color;
|
||||
tail.str += 3;
|
||||
tail.size -= 3;
|
||||
i += 3;
|
||||
}
|
||||
else if (match_part(tail, make_lit_string("TODO"))){
|
||||
Highlight_Record *record = push_array(scratch, Highlight_Record, 1);
|
||||
record->first = i + on_screen_range.first;
|
||||
record->one_past_last = record->first + 4;
|
||||
record->color = colors[1].color;
|
||||
tail.str += 3;
|
||||
tail.size -= 3;
|
||||
i += 3;
|
||||
}
|
||||
}
|
||||
int32_t record_count = (int32_t)(push_array(scratch, Highlight_Record, 0) - records);
|
||||
push_array(scratch, Highlight_Record, 1);
|
||||
|
||||
if (record_count > 0){
|
||||
sort_highlight_record(records, 0, record_count);
|
||||
Temp_Memory marker_temp = begin_temp_memory(scratch);
|
||||
Marker *markers = push_array(scratch, Marker, 0);
|
||||
int_color current_color = records[0].color;
|
||||
{
|
||||
Managed_Object o = alloc_buffer_markers_on_buffer(app, buffer.buffer_id, 1, &render_scope);
|
||||
Marker marker = {0};
|
||||
marker.pos = view.cursor.pos;
|
||||
managed_object_store_data(app, o, 0, 1, &marker);
|
||||
Marker_Visuals visuals = create_marker_visuals(app, o);
|
||||
marker_visuals_set_look(app, visuals, BufferMarkersType_CharacterIBars, cursor_color, SymbolicColor_Default, 0);
|
||||
Marker *marker = push_array(scratch, Marker, 2);
|
||||
marker[0].pos = records[0].first;
|
||||
marker[1].pos = records[0].one_past_last;
|
||||
}
|
||||
if (view.cursor.pos != view.mark.pos){
|
||||
Managed_Object o = alloc_buffer_markers_on_buffer(app, buffer.buffer_id, 2, &render_scope);
|
||||
Range range = make_range(view.cursor.pos, view.mark.pos);
|
||||
Marker markers[2] = {0};
|
||||
markers[0].pos = range.first;
|
||||
markers[1].pos = range.one_past_last;
|
||||
managed_object_store_data(app, o, 0, 2, markers);
|
||||
Marker_Visuals visuals = create_marker_visuals(app, o);
|
||||
marker_visuals_set_look(app, visuals, BufferMarkersType_CharacterHighlightRanges, highlight_color, SymbolicColor_Default, 0);
|
||||
for (int32_t i = 1; i <= record_count; i += 1){
|
||||
bool32 do_emit = i == record_count || (records[i].color != current_color);
|
||||
if (do_emit){
|
||||
int32_t marker_count = (int32_t)(push_array(scratch, Marker, 0) - markers);
|
||||
Managed_Object o = alloc_buffer_markers_on_buffer(app, buffer.buffer_id, marker_count, &render_scope);
|
||||
managed_object_store_data(app, o, 0, marker_count, markers);
|
||||
Marker_Visuals v = create_marker_visuals(app, o);
|
||||
marker_visuals_set_look(app, v,
|
||||
BufferMarkersType_CharacterHighlightRanges,
|
||||
SymbolicColor_Transparent, current_color, 0);
|
||||
marker_visuals_set_priority(app, v, VisualPriority_Lowest);
|
||||
end_temp_memory(marker_temp);
|
||||
current_color = records[i].color;
|
||||
}
|
||||
|
||||
Marker *marker = push_array(scratch, Marker, 2);
|
||||
marker[0].pos = records[i].first;
|
||||
marker[1].pos = records[i].one_past_last;
|
||||
}
|
||||
}break;
|
||||
}
|
||||
|
||||
end_temp_memory(temp);
|
||||
}
|
||||
|
||||
// NOTE(allen): Cursor and mark
|
||||
Managed_Object cursor_and_mark = alloc_buffer_markers_on_buffer(app, buffer.buffer_id, 2, &render_scope);
|
||||
Marker cm_markers[2] = {0};
|
||||
cm_markers[0].pos = view.cursor.pos;
|
||||
cm_markers[1].pos = view.mark.pos;
|
||||
managed_object_store_data(app, cursor_and_mark, 0, 2, cm_markers);
|
||||
|
||||
if (!cursor_is_hidden){
|
||||
switch (fcoder_mode){
|
||||
case FCoderMode_Original:
|
||||
{
|
||||
Theme_Color colors[2] = {0};
|
||||
colors[0].tag = Stag_Cursor;
|
||||
colors[1].tag = Stag_Mark;
|
||||
get_theme_colors(app, colors, 2);
|
||||
uint32_t cursor_color = colors[0].color;
|
||||
uint32_t mark_color = colors[1].color;
|
||||
|
||||
Marker_Visuals_Take_Rule take_rule = {0};
|
||||
take_rule.first_index = 0;
|
||||
take_rule.take_count_per_step = 1;
|
||||
take_rule.step_stride_in_marker_count = 1;
|
||||
take_rule.maximum_number_of_markers = 1;
|
||||
|
||||
Marker_Visuals visuals = create_marker_visuals(app, cursor_and_mark);
|
||||
Marker_Visuals_Type type = is_active_view?BufferMarkersType_CharacterBlocks:BufferMarkersType_CharacterWireFrames;
|
||||
marker_visuals_set_look(app, visuals,
|
||||
type, cursor_color, SymbolicColorFromPalette(Stag_At_Cursor), 0);
|
||||
marker_visuals_set_take_rule(app, visuals, take_rule);
|
||||
marker_visuals_set_priority(app, visuals, VisualPriority_Highest);
|
||||
|
||||
visuals = create_marker_visuals(app, cursor_and_mark);
|
||||
marker_visuals_set_look(app, visuals,
|
||||
BufferMarkersType_CharacterWireFrames, mark_color, 0, 0);
|
||||
take_rule.first_index = 1;
|
||||
marker_visuals_set_take_rule(app, visuals, take_rule);
|
||||
marker_visuals_set_priority(app, visuals, VisualPriority_Highest);
|
||||
}break;
|
||||
|
||||
case FCoderMode_NotepadLike:
|
||||
{
|
||||
Theme_Color colors[2] = {0};
|
||||
colors[0].tag = Stag_Cursor;
|
||||
colors[1].tag = Stag_Highlight;
|
||||
get_theme_colors(app, colors, 2);
|
||||
uint32_t cursor_color = colors[0].color;
|
||||
uint32_t highlight_color = colors[1].color;
|
||||
|
||||
Marker_Visuals_Take_Rule take_rule = {0};
|
||||
take_rule.first_index = 0;
|
||||
take_rule.take_count_per_step = 1;
|
||||
take_rule.step_stride_in_marker_count = 1;
|
||||
take_rule.maximum_number_of_markers = 1;
|
||||
|
||||
Marker_Visuals visuals = create_marker_visuals(app, cursor_and_mark);
|
||||
marker_visuals_set_look(app, visuals, BufferMarkersType_CharacterIBars, cursor_color, 0, 0);
|
||||
marker_visuals_set_take_rule(app, visuals, take_rule);
|
||||
marker_visuals_set_priority(app, visuals, VisualPriority_Highest);
|
||||
|
||||
if (view.cursor.pos != view.mark.pos){
|
||||
visuals = create_marker_visuals(app, cursor_and_mark);
|
||||
marker_visuals_set_look(app, visuals, BufferMarkersType_CharacterHighlightRanges, highlight_color, SymbolicColorFromPalette(Stag_At_Highlight), 0);
|
||||
take_rule.maximum_number_of_markers = 2;
|
||||
marker_visuals_set_take_rule(app, visuals, take_rule);
|
||||
marker_visuals_set_priority(app, visuals, VisualPriority_Highest);
|
||||
}
|
||||
}break;
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE(allen): Line highlight setup
|
||||
|
@ -126,12 +323,16 @@ RENDER_CALLER_SIG(default_render_caller){
|
|||
color.tag = Stag_Highlight_Cursor_Line;
|
||||
get_theme_colors(app, &color, 1);
|
||||
uint32_t line_color = color.color;
|
||||
Managed_Object o = alloc_buffer_markers_on_buffer(app, buffer.buffer_id, 1, &render_scope);
|
||||
Marker marker = {0};
|
||||
marker.pos = view.cursor.pos;
|
||||
managed_object_store_data(app, o, 0, 1, &marker);
|
||||
Marker_Visuals visuals = create_marker_visuals(app, o);
|
||||
marker_visuals_set_look(app, visuals, BufferMarkersType_LineHighlights, line_color, SymbolicColor_Default, 0);
|
||||
Marker_Visuals visuals = create_marker_visuals(app, cursor_and_mark);
|
||||
marker_visuals_set_look(app, visuals, BufferMarkersType_LineHighlights,
|
||||
line_color, 0, 0);
|
||||
Marker_Visuals_Take_Rule take_rule = {0};
|
||||
take_rule.first_index = 0;
|
||||
take_rule.take_count_per_step = 1;
|
||||
take_rule.step_stride_in_marker_count = 1;
|
||||
take_rule.maximum_number_of_markers = 1;
|
||||
marker_visuals_set_take_rule(app, visuals, take_rule);
|
||||
marker_visuals_set_priority(app, visuals, VisualPriority_Highest);
|
||||
}
|
||||
|
||||
// NOTE(allen): Token highlight setup
|
||||
|
@ -153,63 +354,42 @@ RENDER_CALLER_SIG(default_render_caller){
|
|||
range_markers[1].pos = pos2;
|
||||
managed_object_store_data(app, token_highlight, 0, 2, range_markers);
|
||||
Marker_Visuals visuals = create_marker_visuals(app, token_highlight);
|
||||
marker_visuals_set_look(app, visuals, BufferMarkersType_CharacterHighlightRanges, token_color, SymbolicColor_Default, 0);
|
||||
marker_visuals_set_look(app, visuals,
|
||||
BufferMarkersType_CharacterHighlightRanges,
|
||||
token_color, SymbolicColorFromPalette(Stag_At_Highlight), 0);
|
||||
}
|
||||
|
||||
// NOTE(allen): Matching enclosure highlight setup
|
||||
bool32 do_matching_enclosure_highlight = true;
|
||||
static uint32_t enclosure_colors[4] = {
|
||||
0x70A00000,
|
||||
0x7000A000,
|
||||
0x700000A0,
|
||||
0x70A0A000,
|
||||
};
|
||||
int32_t color_count = ArrayCount(enclosure_colors);
|
||||
|
||||
static const int32_t color_count = 4;
|
||||
if (do_matching_enclosure_highlight){
|
||||
Partition *scratch = &global_part;
|
||||
Temp_Memory temp = begin_temp_memory(scratch);
|
||||
Range *ranges = push_array(scratch, Range, 0);
|
||||
int32_t p = view.cursor.pos;
|
||||
for (;;){
|
||||
Range range = {0};
|
||||
if (find_scope_range(app, &buffer, p, &range)){
|
||||
p = range.first;
|
||||
Range *r = push_array(scratch, Range, 1);
|
||||
*r = range;
|
||||
}
|
||||
else{
|
||||
break;
|
||||
}
|
||||
Theme_Color theme_colors[color_count];
|
||||
int_color colors[color_count];
|
||||
for (int32_t i = 0; i < 4; i += 1){
|
||||
theme_colors[i].tag = Stag_Back_Cycle_1 + i;
|
||||
}
|
||||
int32_t count = (int32_t)(push_array(scratch, Range, 0) - ranges);
|
||||
|
||||
int32_t bucket_count = count/color_count;
|
||||
int32_t left_over_count = count%color_count;
|
||||
|
||||
for (int32_t i = 0; i < color_count; i += 1){
|
||||
int32_t sub_count = bucket_count + (i < left_over_count?1:0);
|
||||
if (sub_count > 0){
|
||||
int32_t marker_count = sub_count*2;
|
||||
Temp_Memory marker_temp = begin_temp_memory(scratch);
|
||||
Marker *markers = push_array(scratch, Marker, marker_count);
|
||||
memset(markers, 0, sizeof(*markers)*marker_count);
|
||||
// NOTE(allen): Iterate the ranges in reverse order,
|
||||
// to ensure top level scopes always get the first color.
|
||||
Range *range_ptr = ranges + count - 1 - i;
|
||||
for (int32_t j = 0; j < marker_count; j += 2, range_ptr -= 4){
|
||||
markers[j + 0].pos = range_ptr->first;
|
||||
markers[j + 1].pos = range_ptr->one_past_last - 1;
|
||||
}
|
||||
Managed_Object m = alloc_buffer_markers_on_buffer(app, buffer.buffer_id, marker_count, &render_scope);
|
||||
managed_object_store_data(app, m, 0, marker_count, markers);
|
||||
Marker_Visuals visuals = create_marker_visuals(app, m);
|
||||
marker_visuals_set_look(app, visuals, BufferMarkersType_CharacterBlocks, enclosure_colors[i], SymbolicColor_Default, 0);
|
||||
end_temp_memory(marker_temp);
|
||||
}
|
||||
get_theme_colors(app, theme_colors, color_count);
|
||||
for (int32_t i = 0; i < 4; i += 1){
|
||||
colors[i] = theme_colors[i].color;
|
||||
}
|
||||
|
||||
end_temp_memory(temp);
|
||||
mark_enclosures(app, scratch, render_scope,
|
||||
&buffer, view.cursor.pos, FindScope_Brace,
|
||||
BufferMarkersType_LineHighlightRanges,
|
||||
colors, 0, color_count);
|
||||
}
|
||||
if (do_matching_paren_highlight){
|
||||
Theme_Color theme_colors[color_count];
|
||||
int_color colors[color_count];
|
||||
for (int32_t i = 0; i < 4; i += 1){
|
||||
theme_colors[i].tag = Stag_Text_Cycle_1 + i;
|
||||
}
|
||||
get_theme_colors(app, theme_colors, color_count);
|
||||
for (int32_t i = 0; i < 4; i += 1){
|
||||
colors[i] = theme_colors[i].color;
|
||||
}
|
||||
mark_enclosures(app, scratch, render_scope,
|
||||
&buffer, view.cursor.pos, FindScope_Paren,
|
||||
BufferMarkersType_CharacterBlocks,
|
||||
0, colors, color_count);
|
||||
}
|
||||
|
||||
do_core_render(app);
|
||||
|
|
|
@ -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 214
|
||||
#define command_one_past_last_id 216
|
||||
#if defined(CUSTOM_COMMAND_SIG)
|
||||
#define PROC_LINKS(x,y) x
|
||||
#else
|
||||
|
@ -42,9 +42,7 @@ CUSTOM_COMMAND_SIG(delete_file_query);
|
|||
CUSTOM_COMMAND_SIG(delete_line);
|
||||
CUSTOM_COMMAND_SIG(delete_range);
|
||||
CUSTOM_COMMAND_SIG(delete_word);
|
||||
CUSTOM_COMMAND_SIG(disable_highlight_line_at_cursor);
|
||||
CUSTOM_COMMAND_SIG(duplicate_line);
|
||||
CUSTOM_COMMAND_SIG(enable_highlight_line_at_cursor);
|
||||
CUSTOM_COMMAND_SIG(eol_dosify);
|
||||
CUSTOM_COMMAND_SIG(eol_nixify);
|
||||
CUSTOM_COMMAND_SIG(execute_any_cli);
|
||||
|
@ -191,6 +189,8 @@ CUSTOM_COMMAND_SIG(set_bindings_choose);
|
|||
CUSTOM_COMMAND_SIG(set_bindings_default);
|
||||
CUSTOM_COMMAND_SIG(set_bindings_mac_default);
|
||||
CUSTOM_COMMAND_SIG(set_mark);
|
||||
CUSTOM_COMMAND_SIG(set_mode_to_notepad_like);
|
||||
CUSTOM_COMMAND_SIG(set_mode_to_original);
|
||||
CUSTOM_COMMAND_SIG(setup_build_bat);
|
||||
CUSTOM_COMMAND_SIG(setup_build_bat_and_sh);
|
||||
CUSTOM_COMMAND_SIG(setup_build_sh);
|
||||
|
@ -206,9 +206,11 @@ CUSTOM_COMMAND_SIG(to_lowercase);
|
|||
CUSTOM_COMMAND_SIG(to_uppercase);
|
||||
CUSTOM_COMMAND_SIG(toggle_filebar);
|
||||
CUSTOM_COMMAND_SIG(toggle_fullscreen);
|
||||
CUSTOM_COMMAND_SIG(toggle_highlight_enclosing_scopes);
|
||||
CUSTOM_COMMAND_SIG(toggle_highlight_line_at_cursor);
|
||||
CUSTOM_COMMAND_SIG(toggle_line_wrap);
|
||||
CUSTOM_COMMAND_SIG(toggle_mouse);
|
||||
CUSTOM_COMMAND_SIG(toggle_paren_matching_helper);
|
||||
CUSTOM_COMMAND_SIG(toggle_show_whitespace);
|
||||
CUSTOM_COMMAND_SIG(toggle_virtual_whitespace);
|
||||
CUSTOM_COMMAND_SIG(undo);
|
||||
|
@ -234,81 +236,79 @@ char *source_name;
|
|||
int32_t source_name_len;
|
||||
int32_t line_number;
|
||||
};
|
||||
static Command_Metadata fcoder_metacmd_table[214] = {
|
||||
static Command_Metadata fcoder_metacmd_table[216] = {
|
||||
{ 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 },
|
||||
{ PROC_LINKS(auto_tab_whole_file, 0), "auto_tab_whole_file", 19, "Audo-indents the entire current buffer.", 39, "w:\\4ed\\code\\4coder_auto_indent.cpp", 34, 712 },
|
||||
{ PROC_LINKS(backspace_char, 0), "backspace_char", 14, "Deletes the character to the left of the cursor.", 48, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 73 },
|
||||
{ PROC_LINKS(backspace_word, 0), "backspace_word", 14, "Delete characters between the cursor position and the first alphanumeric boundary to the left.", 94, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1247 },
|
||||
{ PROC_LINKS(basic_change_active_panel, 0), "basic_change_active_panel", 25, "Change the currently active panel, moving to the panel with the next highest view_id. Will not skipe the build panel if it is open.", 132, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 476 },
|
||||
{ PROC_LINKS(backspace_word, 0), "backspace_word", 14, "Delete characters between the cursor position and the first alphanumeric boundary to the left.", 94, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1258 },
|
||||
{ PROC_LINKS(basic_change_active_panel, 0), "basic_change_active_panel", 25, "Change the currently active panel, moving to the panel with the next highest view_id. Will not skipe the build panel if it is open.", 132, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 479 },
|
||||
{ PROC_LINKS(build_in_build_panel, 0), "build_in_build_panel", 20, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*. Puts the *compilation* buffer in a panel at the footer of the current view.", 230, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 187 },
|
||||
{ PROC_LINKS(build_search, 0), "build_search", 12, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*.", 153, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 155 },
|
||||
{ PROC_LINKS(center_view, 0), "center_view", 11, "Centers the view vertically on the line on which the cursor sits.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 126 },
|
||||
{ PROC_LINKS(center_view, 0), "center_view", 11, "Centers the view vertically on the line on which the cursor sits.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 121 },
|
||||
{ PROC_LINKS(change_active_panel, 0), "change_active_panel", 19, "Change the currently active panel, moving to the panel with the next highest view_id.", 85, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 144 },
|
||||
{ PROC_LINKS(change_active_panel_backwards, 0), "change_active_panel_backwards", 29, "Change the currently active panel, moving to the panel with the next lowest view_id.", 84, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 154 },
|
||||
{ PROC_LINKS(change_to_build_panel, 0), "change_to_build_panel", 21, "If the special build panel is open, makes the build panel the active panel.", 75, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 209 },
|
||||
{ PROC_LINKS(clean_all_lines, 0), "clean_all_lines", 15, "Removes trailing whitespace from all lines in the current buffer.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 411 },
|
||||
{ PROC_LINKS(click_set_cursor, 0), "click_set_cursor", 16, "Sets the cursor position to the mouse position.", 47, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 193 },
|
||||
{ PROC_LINKS(click_set_cursor_and_mark, 0), "click_set_cursor_and_mark", 25, "Sets the cursor position and mark to the mouse position.", 56, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 180 },
|
||||
{ PROC_LINKS(click_set_cursor_if_lbutton, 0), "click_set_cursor_if_lbutton", 27, "If the mouse left button is pressed, sets the cursor position to the mouse position.", 84, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 205 },
|
||||
{ PROC_LINKS(click_set_mark, 0), "click_set_mark", 14, "Sets the mark position to the mouse position.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 219 },
|
||||
{ PROC_LINKS(clean_all_lines, 0), "clean_all_lines", 15, "Removes trailing whitespace from all lines in the current buffer.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 414 },
|
||||
{ PROC_LINKS(click_set_cursor, 0), "click_set_cursor", 16, "Sets the cursor position to the mouse position.", 47, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 188 },
|
||||
{ PROC_LINKS(click_set_cursor_and_mark, 0), "click_set_cursor_and_mark", 25, "Sets the cursor position and mark to the mouse position.", 56, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 175 },
|
||||
{ PROC_LINKS(click_set_cursor_if_lbutton, 0), "click_set_cursor_if_lbutton", 27, "If the mouse left button is pressed, sets the cursor position to the mouse position.", 84, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 201 },
|
||||
{ PROC_LINKS(click_set_mark, 0), "click_set_mark", 14, "Sets the mark position to the mouse position.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 216 },
|
||||
{ PROC_LINKS(close_all_code, 0), "close_all_code", 14, "Closes any buffer with a filename ending with an extension configured to be recognized as a code file type.", 107, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1060 },
|
||||
{ PROC_LINKS(close_build_panel, 0), "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 203 },
|
||||
{ PROC_LINKS(close_panel, 0), "close_panel", 11, "Closes the currently active panel if it is not the only panel open.", 67, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 484 },
|
||||
{ PROC_LINKS(close_panel, 0), "close_panel", 11, "Closes the currently active panel if it is not the only panel open.", 67, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 487 },
|
||||
{ PROC_LINKS(command_lister, 0), "command_lister", 14, "Opens an interactive list of all registered commands.", 53, "w:\\4ed\\code\\4coder_lists.cpp", 28, 935 },
|
||||
{ PROC_LINKS(copy, 0), "copy", 4, "Copy the text in the range from the cursor to the mark onto the clipboard.", 74, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 26 },
|
||||
{ PROC_LINKS(cursor_mark_swap, 0), "cursor_mark_swap", 16, "Swaps the position of the cursor and the mark.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 101 },
|
||||
{ PROC_LINKS(cursor_mark_swap, 0), "cursor_mark_swap", 16, "Swaps the position of the cursor and the mark.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 99 },
|
||||
{ PROC_LINKS(cut, 0), "cut", 3, "Cut the text in the range from the cursor to the mark onto the clipboard.", 73, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 35 },
|
||||
{ PROC_LINKS(decrease_face_size, 0), "decrease_face_size", 18, "Decrease the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 574 },
|
||||
{ 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, 55 },
|
||||
{ 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, 492 },
|
||||
{ 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, 1103 },
|
||||
{ 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, 1353 },
|
||||
{ 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, 113 },
|
||||
{ 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, 1253 },
|
||||
{ PROC_LINKS(disable_highlight_line_at_cursor, 0), "disable_highlight_line_at_cursor", 32, "Disables the line highlight at the cursor.", 42, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 252 },
|
||||
{ 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, 1331 },
|
||||
{ PROC_LINKS(enable_highlight_line_at_cursor, 0), "enable_highlight_line_at_cursor", 31, "Enables the line highlight at the cursor.", 41, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 258 },
|
||||
{ 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(decrease_face_size, 0), "decrease_face_size", 18, "Decrease the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 577 },
|
||||
{ PROC_LINKS(decrease_line_wrap, 0), "decrease_line_wrap", 18, "Decrases the current buffer's width for line wrapping.", 54, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 554 },
|
||||
{ PROC_LINKS(delete_char, 0), "delete_char", 11, "Deletes the character to the right of the cursor.", 49, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 56 },
|
||||
{ PROC_LINKS(delete_current_scope, 0), "delete_current_scope", 20, "Deletes the braces surrounding the currently selected scope. Leaves the contents within the scope.", 99, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 523 },
|
||||
{ PROC_LINKS(delete_file_query, 0), "delete_file_query", 17, "Deletes the file of the current buffer if 4coder has the appropriate access rights. Will ask the user for confirmation first.", 125, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1123 },
|
||||
{ PROC_LINKS(delete_line, 0), "delete_line", 11, "Delete the line the on which the cursor sits.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1373 },
|
||||
{ PROC_LINKS(delete_range, 0), "delete_range", 12, "Deletes the text in the range between the cursor and the mark.", 62, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 109 },
|
||||
{ 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, 1351 },
|
||||
{ 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, 607 },
|
||||
{ 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, 615 },
|
||||
{ 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(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, 1168 },
|
||||
{ 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, 1175 },
|
||||
{ PROC_LINKS(exit_4coder, 0), "exit_4coder", 11, "Attempts to close 4coder.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 623 },
|
||||
{ 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 },
|
||||
{ PROC_LINKS(goto_first_jump_same_panel_sticky, 0), "goto_first_jump_same_panel_sticky", 33, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer and views the buffer in the panel where the jump list was.", 153, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 557 },
|
||||
{ PROC_LINKS(goto_first_jump_sticky, 0), "goto_first_jump_sticky", 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_sticky.cpp", 34, 539 },
|
||||
{ PROC_LINKS(goto_first_jump_same_panel_sticky, 0), "goto_first_jump_same_panel_sticky", 33, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer and views the buffer in the panel where the jump list was.", 153, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 550 },
|
||||
{ PROC_LINKS(goto_first_jump_sticky, 0), "goto_first_jump_sticky", 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_sticky.cpp", 34, 532 },
|
||||
{ PROC_LINKS(goto_jump_at_cursor_direct, 0), "goto_jump_at_cursor_direct", 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_direct.cpp", 34, 8 },
|
||||
{ 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, 383 },
|
||||
{ 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, 355 },
|
||||
{ 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_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, 631 },
|
||||
{ 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, 508 },
|
||||
{ PROC_LINKS(goto_next_jump_sticky, 0), "goto_next_jump_sticky", 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_sticky.cpp", 34, 478 },
|
||||
{ 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 },
|
||||
{ PROC_LINKS(goto_next_jump_sticky, 0), "goto_next_jump_sticky", 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_sticky.cpp", 34, 471 },
|
||||
{ PROC_LINKS(goto_prev_jump_direct, 0), "goto_prev_jump_direct", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 57 },
|
||||
{ PROC_LINKS(goto_prev_jump_no_skips_direct, 0), "goto_prev_jump_no_skips_direct", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 75 },
|
||||
{ PROC_LINKS(goto_prev_jump_no_skips_sticky, 0), "goto_prev_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 524 },
|
||||
{ PROC_LINKS(goto_prev_jump_sticky, 0), "goto_prev_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 494 },
|
||||
{ PROC_LINKS(hide_filebar, 0), "hide_filebar", 12, "Sets the current view to hide it's filebar.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 514 },
|
||||
{ PROC_LINKS(hide_scrollbar, 0), "hide_scrollbar", 14, "Sets the current view to hide it's scrollbar.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 500 },
|
||||
{ PROC_LINKS(highlight_next_scope_absolute, 0), "highlight_next_scope_absolute", 29, "Finds the first scope started by '{' after the cursor and puts the cursor and mark on the '{' and '}'.", 102, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 368 },
|
||||
{ PROC_LINKS(highlight_prev_scope_absolute, 0), "highlight_prev_scope_absolute", 29, "Finds the first scope started by '{' before the cursor and puts the cursor and mark on the '{' and '}'.", 103, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 387 },
|
||||
{ PROC_LINKS(highlight_surrounding_scope, 0), "highlight_surrounding_scope", 27, "Finds the scope enclosed by '{' '}' surrounding the cursor and puts the cursor and mark on the '{' and '}'.", 107, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 353 },
|
||||
{ PROC_LINKS(goto_prev_jump_no_skips_sticky, 0), "goto_prev_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 517 },
|
||||
{ PROC_LINKS(goto_prev_jump_sticky, 0), "goto_prev_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 487 },
|
||||
{ PROC_LINKS(hide_filebar, 0), "hide_filebar", 12, "Sets the current view to hide it's filebar.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 517 },
|
||||
{ PROC_LINKS(hide_scrollbar, 0), "hide_scrollbar", 14, "Sets the current view to hide it's scrollbar.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 503 },
|
||||
{ PROC_LINKS(highlight_next_scope_absolute, 0), "highlight_next_scope_absolute", 29, "Finds the first scope started by '{' after the cursor and puts the cursor and mark on the '{' and '}'.", 102, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 400 },
|
||||
{ PROC_LINKS(highlight_prev_scope_absolute, 0), "highlight_prev_scope_absolute", 29, "Finds the first scope started by '{' before the cursor and puts the cursor and mark on the '{' and '}'.", 103, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 419 },
|
||||
{ PROC_LINKS(highlight_surrounding_scope, 0), "highlight_surrounding_scope", 27, "Finds the scope enclosed by '{' '}' surrounding the cursor and puts the cursor and mark on the '{' and '}'.", 107, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 385 },
|
||||
{ PROC_LINKS(if0_off, 0), "if0_off", 7, "Surround the range between the cursor and mark with an '#if 0' and an '#endif'", 78, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 81 },
|
||||
{ PROC_LINKS(increase_face_size, 0), "increase_face_size", 18, "Increase the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 562 },
|
||||
{ PROC_LINKS(increase_line_wrap, 0), "increase_line_wrap", 18, "Increases the current buffer's width for line wrapping.", 55, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 540 },
|
||||
{ PROC_LINKS(increase_face_size, 0), "increase_face_size", 18, "Increase the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 565 },
|
||||
{ PROC_LINKS(increase_line_wrap, 0), "increase_line_wrap", 18, "Increases the current buffer's width for line wrapping.", 55, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 543 },
|
||||
{ PROC_LINKS(interactive_kill_buffer, 0), "interactive_kill_buffer", 23, "Interactively kill an open buffer.", 34, "w:\\4ed\\code\\4coder_lists.cpp", 28, 749 },
|
||||
{ PROC_LINKS(interactive_new, 0), "interactive_new", 15, "Interactively creates a new file.", 33, "w:\\4ed\\code\\4coder_lists.cpp", 28, 853 },
|
||||
{ PROC_LINKS(interactive_open, 0), "interactive_open", 16, "Interactively opens a file.", 27, "w:\\4ed\\code\\4coder_lists.cpp", 28, 881 },
|
||||
{ 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, 819 },
|
||||
{ PROC_LINKS(interactive_switch_buffer, 0), "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "w:\\4ed\\code\\4coder_lists.cpp", 28, 730 },
|
||||
{ PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1523 },
|
||||
{ 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, 141 },
|
||||
{ PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1543 },
|
||||
{ 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, 136 },
|
||||
{ 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, 358 },
|
||||
{ PROC_LINKS(list_all_functions_all_buffers_lister, 0), "list_all_functions_all_buffers_lister", 37, "Creates a lister of locations that look like function definitions and declarations all buffers.", 95, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 364 },
|
||||
{ PROC_LINKS(list_all_functions_current_buffer, 0), "list_all_functions_current_buffer", 33, "Creates a jump list of lines of the current buffer that appear to define or declare functions.", 94, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 335 },
|
||||
|
@ -341,113 +341,117 @@ static Command_Metadata fcoder_metacmd_table[214] = {
|
|||
{ 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, 1211 },
|
||||
{ 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, 231 },
|
||||
{ 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, 1231 },
|
||||
{ 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, 229 },
|
||||
{ PROC_LINKS(move_down, 0), "move_down", 9, "Moves the cursor down one line.", 31, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 293 },
|
||||
{ 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, 305 },
|
||||
{ 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, 311 },
|
||||
{ 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, 342 },
|
||||
{ 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, 1308 },
|
||||
{ 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, 1244 },
|
||||
{ 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, 351 },
|
||||
{ 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, 1328 },
|
||||
{ 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, 1264 },
|
||||
{ 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, 352 },
|
||||
{ PROC_LINKS(move_up, 0), "move_up", 7, "Moves the cursor up one line.", 29, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 287 },
|
||||
{ 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, 299 },
|
||||
{ PROC_LINKS(newline_or_goto_position_direct, 0), "newline_or_goto_position_direct", 31, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 101 },
|
||||
{ PROC_LINKS(newline_or_goto_position_same_panel_direct, 0), "newline_or_goto_position_same_panel_direct", 42, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 116 },
|
||||
{ PROC_LINKS(newline_or_goto_position_same_panel_sticky, 0), "newline_or_goto_position_same_panel_sticky", 42, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 595 },
|
||||
{ PROC_LINKS(newline_or_goto_position_sticky, 0), "newline_or_goto_position_sticky", 31, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 580 },
|
||||
{ PROC_LINKS(newline_or_goto_position_same_panel_sticky, 0), "newline_or_goto_position_same_panel_sticky", 42, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 588 },
|
||||
{ PROC_LINKS(newline_or_goto_position_sticky, 0), "newline_or_goto_position_sticky", 31, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 573 },
|
||||
{ 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, 897 },
|
||||
{ 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, 1430 },
|
||||
{ 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, 1581 },
|
||||
{ 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, 1450 },
|
||||
{ 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, 1601 },
|
||||
{ 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, 1466 },
|
||||
{ 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, 1486 },
|
||||
{ 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, 331 },
|
||||
{ PROC_LINKS(page_up, 0), "page_up", 7, "Scrolls the view up one view height and moves the cursor up one view height.", 76, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 322 },
|
||||
{ PROC_LINKS(paste, 0), "paste", 5, "At the cursor, insert the text at the top of the clipboard.", 59, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 46 },
|
||||
{ PROC_LINKS(paste_and_indent, 0), "paste_and_indent", 16, "Paste from the top of clipboard and run auto-indent on the newly pasted text.", 77, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 131 },
|
||||
{ PROC_LINKS(paste_next, 0), "paste_next", 10, "If the previous command was paste or paste_next, replaces the paste range with the next text down on the clipboard, otherwise operates as the paste command.", 156, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 83 },
|
||||
{ PROC_LINKS(paste_next_and_indent, 0), "paste_next_and_indent", 21, "Paste the next item on the clipboard and run auto-indent on the newly pasted text.", 82, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 138 },
|
||||
{ PROC_LINKS(place_in_scope, 0), "place_in_scope", 14, "Wraps the code contained in the range between cursor and mark with a new curly brace scope.", 91, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 486 },
|
||||
{ PROC_LINKS(paste_and_indent, 0), "paste_and_indent", 16, "Paste from the top of clipboard and run auto-indent on the newly pasted text.", 77, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 134 },
|
||||
{ PROC_LINKS(paste_next, 0), "paste_next", 10, "If the previous command was paste or paste_next, replaces the paste range with the next text down on the clipboard, otherwise operates as the paste command.", 156, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 85 },
|
||||
{ PROC_LINKS(paste_next_and_indent, 0), "paste_next_and_indent", 21, "Paste the next item on the clipboard and run auto-indent on the newly pasted text.", 82, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 141 },
|
||||
{ PROC_LINKS(place_in_scope, 0), "place_in_scope", 14, "Wraps the code contained in the range between cursor and mark with a new curly brace scope.", 91, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 517 },
|
||||
{ PROC_LINKS(project_command_lister, 0), "project_command_lister", 22, "Open a lister of all commands in the currently loaded project.", 62, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1529 },
|
||||
{ PROC_LINKS(project_fkey_command, 0), "project_fkey_command", 20, "Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.", 175, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1090 },
|
||||
{ PROC_LINKS(project_go_to_root_directory, 0), "project_go_to_root_directory", 28, "Changes 4coder's hot directory to the root directory of the currently loaded project. With no loaded project nothing hapepns.", 125, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1115 },
|
||||
{ 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, 991 },
|
||||
{ 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, 1011 },
|
||||
{ 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, 1029 },
|
||||
{ PROC_LINKS(redo, 0), "redo", 4, "Advances forewards through the undo history.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1538 },
|
||||
{ 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, 1558 },
|
||||
{ PROC_LINKS(remap_interactive, 0), "remap_interactive", 17, "Switch to a named key binding map.", 34, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 278 },
|
||||
{ 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, 1169 },
|
||||
{ PROC_LINKS(reopen, 0), "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1544 },
|
||||
{ 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, 889 },
|
||||
{ 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, 860 },
|
||||
{ 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, 878 },
|
||||
{ PROC_LINKS(save, 0), "save", 4, "Saves the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1550 },
|
||||
{ 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, 1073 },
|
||||
{ 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, 1129 },
|
||||
{ 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, 743 },
|
||||
{ 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, 853 },
|
||||
{ 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, 867 },
|
||||
{ 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, 1227 },
|
||||
{ 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, 1239 },
|
||||
{ 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, 1233 },
|
||||
{ PROC_LINKS(seek_alphanumeric_right, 0), "seek_alphanumeric_right", 23, "Seek right for boundary between alphanumeric characters and non-alphanumeric characters.", 88, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1221 },
|
||||
{ PROC_LINKS(seek_beginning_of_line, 0), "seek_beginning_of_line", 22, "Seeks the cursor to the beginning of the visual line.", 53, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1126 },
|
||||
{ PROC_LINKS(seek_beginning_of_textual_line, 0), "seek_beginning_of_textual_line", 30, "Seeks the cursor to the beginning of the line across all text.", 62, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1108 },
|
||||
{ PROC_LINKS(seek_end_of_line, 0), "seek_end_of_line", 16, "Seeks the cursor to the end of the visual line.", 47, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1137 },
|
||||
{ PROC_LINKS(seek_end_of_textual_line, 0), "seek_end_of_textual_line", 24, "Seeks the cursor to the end of the line across all text.", 56, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1117 },
|
||||
{ PROC_LINKS(seek_token_left, 0), "seek_token_left", 15, "Seek left for the next beginning of a token.", 44, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1203 },
|
||||
{ PROC_LINKS(seek_token_right, 0), "seek_token_right", 16, "Seek right for the next end of a token.", 39, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1197 },
|
||||
{ PROC_LINKS(seek_white_or_token_left, 0), "seek_white_or_token_left", 24, "Seek left for the next end of a token or boundary between whitespace and non-whitespace.", 88, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1215 },
|
||||
{ PROC_LINKS(seek_white_or_token_right, 0), "seek_white_or_token_right", 25, "Seek right for the next end of a token or boundary between whitespace and non-whitespace.", 89, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1209 },
|
||||
{ PROC_LINKS(seek_whitespace_down, 0), "seek_whitespace_down", 20, "Seeks the cursor down to the next blank line.", 45, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1099 },
|
||||
{ PROC_LINKS(seek_whitespace_down_end_line, 0), "seek_whitespace_down_end_line", 29, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1158 },
|
||||
{ PROC_LINKS(seek_whitespace_left, 0), "seek_whitespace_left", 20, "Seek left for the next boundary between whitespace and non-whitespace.", 70, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1191 },
|
||||
{ PROC_LINKS(seek_whitespace_right, 0), "seek_whitespace_right", 21, "Seek right for the next boundary between whitespace and non-whitespace.", 71, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1185 },
|
||||
{ PROC_LINKS(seek_whitespace_up, 0), "seek_whitespace_up", 18, "Seeks the cursor up to the next blank line.", 43, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1090 },
|
||||
{ PROC_LINKS(seek_whitespace_up_end_line, 0), "seek_whitespace_up_end_line", 27, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1148 },
|
||||
{ PROC_LINKS(select_all, 0), "select_all", 10, "Puts the cursor at the top of the file, and the mark at the bottom of the file.", 79, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 360 },
|
||||
{ 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, 1007 },
|
||||
{ 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, 1031 },
|
||||
{ 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, 1049 },
|
||||
{ PROC_LINKS(redo, 0), "redo", 4, "Advances forewards through the undo history.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1558 },
|
||||
{ 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, 1578 },
|
||||
{ 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, 1189 },
|
||||
{ PROC_LINKS(reopen, 0), "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1564 },
|
||||
{ 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, 888 },
|
||||
{ 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, 859 },
|
||||
{ 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, 877 },
|
||||
{ PROC_LINKS(save, 0), "save", 4, "Saves the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1570 },
|
||||
{ PROC_LINKS(save_all_dirty_buffers, 0), "save_all_dirty_buffers", 22, "Saves all buffers marked dirty (showing the '*' indicator).", 59, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1093 },
|
||||
{ PROC_LINKS(save_to_query, 0), "save_to_query", 13, "Queries the user for a file name and saves the contents of the current buffer, altering the buffer's name too.", 110, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1149 },
|
||||
{ PROC_LINKS(scope_absorb_down, 0), "scope_absorb_down", 17, "If a scope is currently selected, and a statement or block statement is present below the current scope, the statement is moved into the scope.", 143, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 774 },
|
||||
{ PROC_LINKS(search, 0), "search", 6, "Begins an incremental search down through the current buffer for a user specified string.", 89, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 852 },
|
||||
{ PROC_LINKS(search_identifier, 0), "search_identifier", 17, "Begins an incremental search down through the current buffer for the word or token under the cursor.", 100, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 866 },
|
||||
{ PROC_LINKS(seek_alphanumeric_left, 0), "seek_alphanumeric_left", 22, "Seek left for boundary between alphanumeric characters and non-alphanumeric characters.", 87, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1238 },
|
||||
{ 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 },
|
||||
{ PROC_LINKS(seek_alphanumeric_right, 0), "seek_alphanumeric_right", 23, "Seek right for boundary between alphanumeric characters and non-alphanumeric characters.", 88, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1232 },
|
||||
{ PROC_LINKS(seek_beginning_of_line, 0), "seek_beginning_of_line", 22, "Seeks the cursor to the beginning of the visual line.", 53, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1131 },
|
||||
{ PROC_LINKS(seek_beginning_of_textual_line, 0), "seek_beginning_of_textual_line", 30, "Seeks the cursor to the beginning of the line across all text.", 62, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1111 },
|
||||
{ PROC_LINKS(seek_end_of_line, 0), "seek_end_of_line", 16, "Seeks the cursor to the end of the visual line.", 47, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1143 },
|
||||
{ PROC_LINKS(seek_end_of_textual_line, 0), "seek_end_of_textual_line", 24, "Seeks the cursor to the end of the line across all text.", 56, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1121 },
|
||||
{ PROC_LINKS(seek_token_left, 0), "seek_token_left", 15, "Seek left for the next beginning of a token.", 44, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1214 },
|
||||
{ PROC_LINKS(seek_token_right, 0), "seek_token_right", 16, "Seek right for the next end of a token.", 39, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1208 },
|
||||
{ PROC_LINKS(seek_white_or_token_left, 0), "seek_white_or_token_left", 24, "Seek left for the next end of a token or boundary between whitespace and non-whitespace.", 88, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1226 },
|
||||
{ PROC_LINKS(seek_white_or_token_right, 0), "seek_white_or_token_right", 25, "Seek right for the next end of a token or boundary between whitespace and non-whitespace.", 89, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1220 },
|
||||
{ PROC_LINKS(seek_whitespace_down, 0), "seek_whitespace_down", 20, "Seeks the cursor down to the next blank line.", 45, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1101 },
|
||||
{ PROC_LINKS(seek_whitespace_down_end_line, 0), "seek_whitespace_down_end_line", 29, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1166 },
|
||||
{ PROC_LINKS(seek_whitespace_left, 0), "seek_whitespace_left", 20, "Seek left for the next boundary between whitespace and non-whitespace.", 70, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1202 },
|
||||
{ PROC_LINKS(seek_whitespace_right, 0), "seek_whitespace_right", 21, "Seek right for the next boundary between whitespace and non-whitespace.", 71, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1196 },
|
||||
{ PROC_LINKS(seek_whitespace_up, 0), "seek_whitespace_up", 18, "Seeks the cursor up to the next blank line.", 43, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1091 },
|
||||
{ PROC_LINKS(seek_whitespace_up_end_line, 0), "seek_whitespace_up_end_line", 27, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1155 },
|
||||
{ PROC_LINKS(select_all, 0), "select_all", 10, "Puts the cursor at the top of the file, and the mark at the bottom of the file.", 79, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 362 },
|
||||
{ PROC_LINKS(set_bindings_choose, 0), "set_bindings_choose", 19, "Remap keybindings using the 'choose' mapping rule.", 50, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 47 },
|
||||
{ PROC_LINKS(set_bindings_default, 0), "set_bindings_default", 20, "Remap keybindings using the 'default' mapping rule.", 51, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 61 },
|
||||
{ PROC_LINKS(set_bindings_mac_default, 0), "set_bindings_mac_default", 24, "Remap keybindings using the 'mac-default' mapping rule.", 55, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 75 },
|
||||
{ PROC_LINKS(set_mark, 0), "set_mark", 8, "Sets the mark to the current position of the cursor.", 52, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 92 },
|
||||
{ PROC_LINKS(set_mark, 0), "set_mark", 8, "Sets the mark to the current position of the cursor.", 52, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 91 },
|
||||
{ PROC_LINKS(set_mode_to_notepad_like, 0), "set_mode_to_notepad_like", 24, "Sets the edit mode to Notepad like.", 35, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 258 },
|
||||
{ PROC_LINKS(set_mode_to_original, 0), "set_mode_to_original", 20, "Sets the edit mode to 4coder original.", 38, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 252 },
|
||||
{ PROC_LINKS(setup_build_bat, 0), "setup_build_bat", 15, "Queries the user for several configuration options and initializes a new build batch script.", 92, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1500 },
|
||||
{ PROC_LINKS(setup_build_bat_and_sh, 0), "setup_build_bat_and_sh", 22, "Queries the user for several configuration options and initializes a new build batch script.", 92, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1512 },
|
||||
{ PROC_LINKS(setup_build_sh, 0), "setup_build_sh", 14, "Queries the user for several configuration options and initializes a new build shell script.", 92, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1506 },
|
||||
{ PROC_LINKS(setup_new_project, 0), "setup_new_project", 17, "Queries the user for several configuration options and initializes a new 4coder project with build scripts for every OS.", 120, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1493 },
|
||||
{ PROC_LINKS(show_filebar, 0), "show_filebar", 12, "Sets the current view to show it's filebar.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 507 },
|
||||
{ PROC_LINKS(show_scrollbar, 0), "show_scrollbar", 14, "Sets the current view to show it's scrollbar.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 493 },
|
||||
{ PROC_LINKS(snipe_token_or_word, 0), "snipe_token_or_word", 19, "Delete a single, whole token on or to the left of the cursor and post it to the clipboard.", 90, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1259 },
|
||||
{ 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, 1265 },
|
||||
{ PROC_LINKS(show_filebar, 0), "show_filebar", 12, "Sets the current view to show it's filebar.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 510 },
|
||||
{ PROC_LINKS(show_scrollbar, 0), "show_scrollbar", 14, "Sets the current view to show it's scrollbar.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 496 },
|
||||
{ PROC_LINKS(snipe_token_or_word, 0), "snipe_token_or_word", 19, "Delete a single, whole token on or to the left of the cursor and post it to the clipboard.", 90, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1270 },
|
||||
{ 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, 193 },
|
||||
{ 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, 1490 },
|
||||
{ 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 },
|
||||
{ PROC_LINKS(toggle_fullscreen, 0), "toggle_fullscreen", 17, "Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.", 89, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 270 },
|
||||
{ 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, 1510 },
|
||||
{ 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, 394 },
|
||||
{ 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, 374 },
|
||||
{ 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, 524 },
|
||||
{ PROC_LINKS(toggle_fullscreen, 0), "toggle_fullscreen", 17, "Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.", 89, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 282 },
|
||||
{ PROC_LINKS(toggle_highlight_enclosing_scopes, 0), "toggle_highlight_enclosing_scopes", 33, "In code files scopes surrounding the cursor are highlighted with distinguishing colors.", 87, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 270 },
|
||||
{ PROC_LINKS(toggle_highlight_line_at_cursor, 0), "toggle_highlight_line_at_cursor", 31, "Toggles the line highlight at the cursor.", 41, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 264 },
|
||||
{ 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_line_wrap, 0), "toggle_line_wrap", 16, "Toggles the current buffer's line wrapping status.", 50, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 533 },
|
||||
{ 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_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, 1532 },
|
||||
{ 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, 1480 },
|
||||
{ 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, 600 },
|
||||
{ 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, 589 },
|
||||
{ PROC_LINKS(undo, 0), "undo", 4, "Advances backwards through the undo history.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1552 },
|
||||
{ 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, 1500 },
|
||||
{ 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 },
|
||||
{ PROC_LINKS(write_block, 0), "write_block", 11, "At the cursor, insert a block comment.", 38, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 105 },
|
||||
{ PROC_LINKS(write_character, 0), "write_character", 15, "Inserts whatever character was used to trigger this command.", 60, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 39 },
|
||||
{ PROC_LINKS(write_character, 0), "write_character", 15, "Inserts whatever character was used to trigger this command.", 60, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 40 },
|
||||
{ PROC_LINKS(write_hack, 0), "write_hack", 10, "At the cursor, insert a '// HACK' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 93 },
|
||||
{ PROC_LINKS(write_note, 0), "write_note", 10, "At the cursor, insert a '// NOTE' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 99 },
|
||||
{ PROC_LINKS(write_todo, 0), "write_todo", 10, "At the cursor, insert a '// TODO' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 87 },
|
||||
{ PROC_LINKS(write_underscore, 0), "write_underscore", 16, "Inserts an underscore.", 22, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 48 },
|
||||
{ PROC_LINKS(write_underscore, 0), "write_underscore", 16, "Inserts an underscore.", 22, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 49 },
|
||||
{ PROC_LINKS(write_zero_struct, 0), "write_zero_struct", 17, "At the cursor, insert a ' = {0};'.", 34, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 111 },
|
||||
};
|
||||
static int32_t fcoder_metacmd_ID_allow_mouse = 0;
|
||||
|
@ -483,155 +487,155 @@ static int32_t fcoder_metacmd_ID_delete_file_query = 29;
|
|||
static int32_t fcoder_metacmd_ID_delete_line = 30;
|
||||
static int32_t fcoder_metacmd_ID_delete_range = 31;
|
||||
static int32_t fcoder_metacmd_ID_delete_word = 32;
|
||||
static int32_t fcoder_metacmd_ID_disable_highlight_line_at_cursor = 33;
|
||||
static int32_t fcoder_metacmd_ID_duplicate_line = 34;
|
||||
static int32_t fcoder_metacmd_ID_enable_highlight_line_at_cursor = 35;
|
||||
static int32_t fcoder_metacmd_ID_eol_dosify = 36;
|
||||
static int32_t fcoder_metacmd_ID_eol_nixify = 37;
|
||||
static int32_t fcoder_metacmd_ID_execute_any_cli = 38;
|
||||
static int32_t fcoder_metacmd_ID_execute_previous_cli = 39;
|
||||
static int32_t fcoder_metacmd_ID_exit_4coder = 40;
|
||||
static int32_t fcoder_metacmd_ID_goto_beginning_of_file = 41;
|
||||
static int32_t fcoder_metacmd_ID_goto_end_of_file = 42;
|
||||
static int32_t fcoder_metacmd_ID_goto_first_jump_direct = 43;
|
||||
static int32_t fcoder_metacmd_ID_goto_first_jump_same_panel_sticky = 44;
|
||||
static int32_t fcoder_metacmd_ID_goto_first_jump_sticky = 45;
|
||||
static int32_t fcoder_metacmd_ID_goto_jump_at_cursor_direct = 46;
|
||||
static int32_t fcoder_metacmd_ID_goto_jump_at_cursor_same_panel_direct = 47;
|
||||
static int32_t fcoder_metacmd_ID_goto_jump_at_cursor_same_panel_sticky = 48;
|
||||
static int32_t fcoder_metacmd_ID_goto_jump_at_cursor_sticky = 49;
|
||||
static int32_t fcoder_metacmd_ID_goto_line = 50;
|
||||
static int32_t fcoder_metacmd_ID_goto_next_jump_direct = 51;
|
||||
static int32_t fcoder_metacmd_ID_goto_next_jump_no_skips_direct = 52;
|
||||
static int32_t fcoder_metacmd_ID_goto_next_jump_no_skips_sticky = 53;
|
||||
static int32_t fcoder_metacmd_ID_goto_next_jump_sticky = 54;
|
||||
static int32_t fcoder_metacmd_ID_goto_prev_jump_direct = 55;
|
||||
static int32_t fcoder_metacmd_ID_goto_prev_jump_no_skips_direct = 56;
|
||||
static int32_t fcoder_metacmd_ID_goto_prev_jump_no_skips_sticky = 57;
|
||||
static int32_t fcoder_metacmd_ID_goto_prev_jump_sticky = 58;
|
||||
static int32_t fcoder_metacmd_ID_hide_filebar = 59;
|
||||
static int32_t fcoder_metacmd_ID_hide_scrollbar = 60;
|
||||
static int32_t fcoder_metacmd_ID_highlight_next_scope_absolute = 61;
|
||||
static int32_t fcoder_metacmd_ID_highlight_prev_scope_absolute = 62;
|
||||
static int32_t fcoder_metacmd_ID_highlight_surrounding_scope = 63;
|
||||
static int32_t fcoder_metacmd_ID_if0_off = 64;
|
||||
static int32_t fcoder_metacmd_ID_increase_face_size = 65;
|
||||
static int32_t fcoder_metacmd_ID_increase_line_wrap = 66;
|
||||
static int32_t fcoder_metacmd_ID_interactive_kill_buffer = 67;
|
||||
static int32_t fcoder_metacmd_ID_interactive_new = 68;
|
||||
static int32_t fcoder_metacmd_ID_interactive_open = 69;
|
||||
static int32_t fcoder_metacmd_ID_interactive_open_or_new = 70;
|
||||
static int32_t fcoder_metacmd_ID_interactive_switch_buffer = 71;
|
||||
static int32_t fcoder_metacmd_ID_kill_buffer = 72;
|
||||
static int32_t fcoder_metacmd_ID_left_adjust_view = 73;
|
||||
static int32_t fcoder_metacmd_ID_list_all_functions_all_buffers = 74;
|
||||
static int32_t fcoder_metacmd_ID_list_all_functions_all_buffers_lister = 75;
|
||||
static int32_t fcoder_metacmd_ID_list_all_functions_current_buffer = 76;
|
||||
static int32_t fcoder_metacmd_ID_list_all_functions_current_buffer_lister = 77;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations = 78;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_case_insensitive = 79;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_identifier = 80;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_identifier_case_insensitive = 81;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_selection = 82;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_selection_case_insensitive = 83;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_type_definition = 84;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_type_definition_of_identifier = 85;
|
||||
static int32_t fcoder_metacmd_ID_list_all_substring_locations = 86;
|
||||
static int32_t fcoder_metacmd_ID_list_all_substring_locations_case_insensitive = 87;
|
||||
static int32_t fcoder_metacmd_ID_lister__activate = 88;
|
||||
static int32_t fcoder_metacmd_ID_lister__backspace_text_field = 89;
|
||||
static int32_t fcoder_metacmd_ID_lister__backspace_text_field__default = 90;
|
||||
static int32_t fcoder_metacmd_ID_lister__backspace_text_field__file_path = 91;
|
||||
static int32_t fcoder_metacmd_ID_lister__mouse_press = 92;
|
||||
static int32_t fcoder_metacmd_ID_lister__mouse_release = 93;
|
||||
static int32_t fcoder_metacmd_ID_lister__move_down = 94;
|
||||
static int32_t fcoder_metacmd_ID_lister__move_down__default = 95;
|
||||
static int32_t fcoder_metacmd_ID_lister__move_up = 96;
|
||||
static int32_t fcoder_metacmd_ID_lister__move_up__default = 97;
|
||||
static int32_t fcoder_metacmd_ID_lister__quit = 98;
|
||||
static int32_t fcoder_metacmd_ID_lister__repaint = 99;
|
||||
static int32_t fcoder_metacmd_ID_lister__wheel_scroll = 100;
|
||||
static int32_t fcoder_metacmd_ID_lister__write_character = 101;
|
||||
static int32_t fcoder_metacmd_ID_lister__write_character__default = 102;
|
||||
static int32_t fcoder_metacmd_ID_lister__write_character__file_path = 103;
|
||||
static int32_t fcoder_metacmd_ID_lister__write_character__fixed_list = 104;
|
||||
static int32_t fcoder_metacmd_ID_load_project = 105;
|
||||
static int32_t fcoder_metacmd_ID_make_directory_query = 106;
|
||||
static int32_t fcoder_metacmd_ID_mouse_wheel_scroll = 107;
|
||||
static int32_t fcoder_metacmd_ID_move_down = 108;
|
||||
static int32_t fcoder_metacmd_ID_move_down_10 = 109;
|
||||
static int32_t fcoder_metacmd_ID_move_down_textual = 110;
|
||||
static int32_t fcoder_metacmd_ID_move_left = 111;
|
||||
static int32_t fcoder_metacmd_ID_move_line_down = 112;
|
||||
static int32_t fcoder_metacmd_ID_move_line_up = 113;
|
||||
static int32_t fcoder_metacmd_ID_move_right = 114;
|
||||
static int32_t fcoder_metacmd_ID_move_up = 115;
|
||||
static int32_t fcoder_metacmd_ID_move_up_10 = 116;
|
||||
static int32_t fcoder_metacmd_ID_newline_or_goto_position_direct = 117;
|
||||
static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_direct = 118;
|
||||
static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_sticky = 119;
|
||||
static int32_t fcoder_metacmd_ID_newline_or_goto_position_sticky = 120;
|
||||
static int32_t fcoder_metacmd_ID_open_all_code = 121;
|
||||
static int32_t fcoder_metacmd_ID_open_all_code_recursive = 122;
|
||||
static int32_t fcoder_metacmd_ID_open_color_tweaker = 123;
|
||||
static int32_t fcoder_metacmd_ID_open_file_in_quotes = 124;
|
||||
static int32_t fcoder_metacmd_ID_open_in_other = 125;
|
||||
static int32_t fcoder_metacmd_ID_open_long_braces = 126;
|
||||
static int32_t fcoder_metacmd_ID_open_long_braces_break = 127;
|
||||
static int32_t fcoder_metacmd_ID_open_long_braces_semicolon = 128;
|
||||
static int32_t fcoder_metacmd_ID_open_matching_file_cpp = 129;
|
||||
static int32_t fcoder_metacmd_ID_open_panel_hsplit = 130;
|
||||
static int32_t fcoder_metacmd_ID_open_panel_vsplit = 131;
|
||||
static int32_t fcoder_metacmd_ID_page_down = 132;
|
||||
static int32_t fcoder_metacmd_ID_page_up = 133;
|
||||
static int32_t fcoder_metacmd_ID_paste = 134;
|
||||
static int32_t fcoder_metacmd_ID_paste_and_indent = 135;
|
||||
static int32_t fcoder_metacmd_ID_paste_next = 136;
|
||||
static int32_t fcoder_metacmd_ID_paste_next_and_indent = 137;
|
||||
static int32_t fcoder_metacmd_ID_place_in_scope = 138;
|
||||
static int32_t fcoder_metacmd_ID_project_command_lister = 139;
|
||||
static int32_t fcoder_metacmd_ID_project_fkey_command = 140;
|
||||
static int32_t fcoder_metacmd_ID_project_go_to_root_directory = 141;
|
||||
static int32_t fcoder_metacmd_ID_query_replace = 142;
|
||||
static int32_t fcoder_metacmd_ID_query_replace_identifier = 143;
|
||||
static int32_t fcoder_metacmd_ID_query_replace_selection = 144;
|
||||
static int32_t fcoder_metacmd_ID_redo = 145;
|
||||
static int32_t fcoder_metacmd_ID_reload_themes = 146;
|
||||
static int32_t fcoder_metacmd_ID_remap_interactive = 147;
|
||||
static int32_t fcoder_metacmd_ID_rename_file_query = 148;
|
||||
static int32_t fcoder_metacmd_ID_reopen = 149;
|
||||
static int32_t fcoder_metacmd_ID_replace_in_range = 150;
|
||||
static int32_t fcoder_metacmd_ID_reverse_search = 151;
|
||||
static int32_t fcoder_metacmd_ID_reverse_search_identifier = 152;
|
||||
static int32_t fcoder_metacmd_ID_save = 153;
|
||||
static int32_t fcoder_metacmd_ID_save_all_dirty_buffers = 154;
|
||||
static int32_t fcoder_metacmd_ID_save_to_query = 155;
|
||||
static int32_t fcoder_metacmd_ID_scope_absorb_down = 156;
|
||||
static int32_t fcoder_metacmd_ID_search = 157;
|
||||
static int32_t fcoder_metacmd_ID_search_identifier = 158;
|
||||
static int32_t fcoder_metacmd_ID_seek_alphanumeric_left = 159;
|
||||
static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_left = 160;
|
||||
static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_right = 161;
|
||||
static int32_t fcoder_metacmd_ID_seek_alphanumeric_right = 162;
|
||||
static int32_t fcoder_metacmd_ID_seek_beginning_of_line = 163;
|
||||
static int32_t fcoder_metacmd_ID_seek_beginning_of_textual_line = 164;
|
||||
static int32_t fcoder_metacmd_ID_seek_end_of_line = 165;
|
||||
static int32_t fcoder_metacmd_ID_seek_end_of_textual_line = 166;
|
||||
static int32_t fcoder_metacmd_ID_seek_token_left = 167;
|
||||
static int32_t fcoder_metacmd_ID_seek_token_right = 168;
|
||||
static int32_t fcoder_metacmd_ID_seek_white_or_token_left = 169;
|
||||
static int32_t fcoder_metacmd_ID_seek_white_or_token_right = 170;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_down = 171;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_down_end_line = 172;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_left = 173;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_right = 174;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_up = 175;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_up_end_line = 176;
|
||||
static int32_t fcoder_metacmd_ID_select_all = 177;
|
||||
static int32_t fcoder_metacmd_ID_set_bindings_choose = 178;
|
||||
static int32_t fcoder_metacmd_ID_set_bindings_default = 179;
|
||||
static int32_t fcoder_metacmd_ID_set_bindings_mac_default = 180;
|
||||
static int32_t fcoder_metacmd_ID_set_mark = 181;
|
||||
static int32_t fcoder_metacmd_ID_duplicate_line = 33;
|
||||
static int32_t fcoder_metacmd_ID_eol_dosify = 34;
|
||||
static int32_t fcoder_metacmd_ID_eol_nixify = 35;
|
||||
static int32_t fcoder_metacmd_ID_execute_any_cli = 36;
|
||||
static int32_t fcoder_metacmd_ID_execute_previous_cli = 37;
|
||||
static int32_t fcoder_metacmd_ID_exit_4coder = 38;
|
||||
static int32_t fcoder_metacmd_ID_goto_beginning_of_file = 39;
|
||||
static int32_t fcoder_metacmd_ID_goto_end_of_file = 40;
|
||||
static int32_t fcoder_metacmd_ID_goto_first_jump_direct = 41;
|
||||
static int32_t fcoder_metacmd_ID_goto_first_jump_same_panel_sticky = 42;
|
||||
static int32_t fcoder_metacmd_ID_goto_first_jump_sticky = 43;
|
||||
static int32_t fcoder_metacmd_ID_goto_jump_at_cursor_direct = 44;
|
||||
static int32_t fcoder_metacmd_ID_goto_jump_at_cursor_same_panel_direct = 45;
|
||||
static int32_t fcoder_metacmd_ID_goto_jump_at_cursor_same_panel_sticky = 46;
|
||||
static int32_t fcoder_metacmd_ID_goto_jump_at_cursor_sticky = 47;
|
||||
static int32_t fcoder_metacmd_ID_goto_line = 48;
|
||||
static int32_t fcoder_metacmd_ID_goto_next_jump_direct = 49;
|
||||
static int32_t fcoder_metacmd_ID_goto_next_jump_no_skips_direct = 50;
|
||||
static int32_t fcoder_metacmd_ID_goto_next_jump_no_skips_sticky = 51;
|
||||
static int32_t fcoder_metacmd_ID_goto_next_jump_sticky = 52;
|
||||
static int32_t fcoder_metacmd_ID_goto_prev_jump_direct = 53;
|
||||
static int32_t fcoder_metacmd_ID_goto_prev_jump_no_skips_direct = 54;
|
||||
static int32_t fcoder_metacmd_ID_goto_prev_jump_no_skips_sticky = 55;
|
||||
static int32_t fcoder_metacmd_ID_goto_prev_jump_sticky = 56;
|
||||
static int32_t fcoder_metacmd_ID_hide_filebar = 57;
|
||||
static int32_t fcoder_metacmd_ID_hide_scrollbar = 58;
|
||||
static int32_t fcoder_metacmd_ID_highlight_next_scope_absolute = 59;
|
||||
static int32_t fcoder_metacmd_ID_highlight_prev_scope_absolute = 60;
|
||||
static int32_t fcoder_metacmd_ID_highlight_surrounding_scope = 61;
|
||||
static int32_t fcoder_metacmd_ID_if0_off = 62;
|
||||
static int32_t fcoder_metacmd_ID_increase_face_size = 63;
|
||||
static int32_t fcoder_metacmd_ID_increase_line_wrap = 64;
|
||||
static int32_t fcoder_metacmd_ID_interactive_kill_buffer = 65;
|
||||
static int32_t fcoder_metacmd_ID_interactive_new = 66;
|
||||
static int32_t fcoder_metacmd_ID_interactive_open = 67;
|
||||
static int32_t fcoder_metacmd_ID_interactive_open_or_new = 68;
|
||||
static int32_t fcoder_metacmd_ID_interactive_switch_buffer = 69;
|
||||
static int32_t fcoder_metacmd_ID_kill_buffer = 70;
|
||||
static int32_t fcoder_metacmd_ID_left_adjust_view = 71;
|
||||
static int32_t fcoder_metacmd_ID_list_all_functions_all_buffers = 72;
|
||||
static int32_t fcoder_metacmd_ID_list_all_functions_all_buffers_lister = 73;
|
||||
static int32_t fcoder_metacmd_ID_list_all_functions_current_buffer = 74;
|
||||
static int32_t fcoder_metacmd_ID_list_all_functions_current_buffer_lister = 75;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations = 76;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_case_insensitive = 77;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_identifier = 78;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_identifier_case_insensitive = 79;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_selection = 80;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_selection_case_insensitive = 81;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_type_definition = 82;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_type_definition_of_identifier = 83;
|
||||
static int32_t fcoder_metacmd_ID_list_all_substring_locations = 84;
|
||||
static int32_t fcoder_metacmd_ID_list_all_substring_locations_case_insensitive = 85;
|
||||
static int32_t fcoder_metacmd_ID_lister__activate = 86;
|
||||
static int32_t fcoder_metacmd_ID_lister__backspace_text_field = 87;
|
||||
static int32_t fcoder_metacmd_ID_lister__backspace_text_field__default = 88;
|
||||
static int32_t fcoder_metacmd_ID_lister__backspace_text_field__file_path = 89;
|
||||
static int32_t fcoder_metacmd_ID_lister__mouse_press = 90;
|
||||
static int32_t fcoder_metacmd_ID_lister__mouse_release = 91;
|
||||
static int32_t fcoder_metacmd_ID_lister__move_down = 92;
|
||||
static int32_t fcoder_metacmd_ID_lister__move_down__default = 93;
|
||||
static int32_t fcoder_metacmd_ID_lister__move_up = 94;
|
||||
static int32_t fcoder_metacmd_ID_lister__move_up__default = 95;
|
||||
static int32_t fcoder_metacmd_ID_lister__quit = 96;
|
||||
static int32_t fcoder_metacmd_ID_lister__repaint = 97;
|
||||
static int32_t fcoder_metacmd_ID_lister__wheel_scroll = 98;
|
||||
static int32_t fcoder_metacmd_ID_lister__write_character = 99;
|
||||
static int32_t fcoder_metacmd_ID_lister__write_character__default = 100;
|
||||
static int32_t fcoder_metacmd_ID_lister__write_character__file_path = 101;
|
||||
static int32_t fcoder_metacmd_ID_lister__write_character__fixed_list = 102;
|
||||
static int32_t fcoder_metacmd_ID_load_project = 103;
|
||||
static int32_t fcoder_metacmd_ID_make_directory_query = 104;
|
||||
static int32_t fcoder_metacmd_ID_mouse_wheel_scroll = 105;
|
||||
static int32_t fcoder_metacmd_ID_move_down = 106;
|
||||
static int32_t fcoder_metacmd_ID_move_down_10 = 107;
|
||||
static int32_t fcoder_metacmd_ID_move_down_textual = 108;
|
||||
static int32_t fcoder_metacmd_ID_move_left = 109;
|
||||
static int32_t fcoder_metacmd_ID_move_line_down = 110;
|
||||
static int32_t fcoder_metacmd_ID_move_line_up = 111;
|
||||
static int32_t fcoder_metacmd_ID_move_right = 112;
|
||||
static int32_t fcoder_metacmd_ID_move_up = 113;
|
||||
static int32_t fcoder_metacmd_ID_move_up_10 = 114;
|
||||
static int32_t fcoder_metacmd_ID_newline_or_goto_position_direct = 115;
|
||||
static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_direct = 116;
|
||||
static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_sticky = 117;
|
||||
static int32_t fcoder_metacmd_ID_newline_or_goto_position_sticky = 118;
|
||||
static int32_t fcoder_metacmd_ID_open_all_code = 119;
|
||||
static int32_t fcoder_metacmd_ID_open_all_code_recursive = 120;
|
||||
static int32_t fcoder_metacmd_ID_open_color_tweaker = 121;
|
||||
static int32_t fcoder_metacmd_ID_open_file_in_quotes = 122;
|
||||
static int32_t fcoder_metacmd_ID_open_in_other = 123;
|
||||
static int32_t fcoder_metacmd_ID_open_long_braces = 124;
|
||||
static int32_t fcoder_metacmd_ID_open_long_braces_break = 125;
|
||||
static int32_t fcoder_metacmd_ID_open_long_braces_semicolon = 126;
|
||||
static int32_t fcoder_metacmd_ID_open_matching_file_cpp = 127;
|
||||
static int32_t fcoder_metacmd_ID_open_panel_hsplit = 128;
|
||||
static int32_t fcoder_metacmd_ID_open_panel_vsplit = 129;
|
||||
static int32_t fcoder_metacmd_ID_page_down = 130;
|
||||
static int32_t fcoder_metacmd_ID_page_up = 131;
|
||||
static int32_t fcoder_metacmd_ID_paste = 132;
|
||||
static int32_t fcoder_metacmd_ID_paste_and_indent = 133;
|
||||
static int32_t fcoder_metacmd_ID_paste_next = 134;
|
||||
static int32_t fcoder_metacmd_ID_paste_next_and_indent = 135;
|
||||
static int32_t fcoder_metacmd_ID_place_in_scope = 136;
|
||||
static int32_t fcoder_metacmd_ID_project_command_lister = 137;
|
||||
static int32_t fcoder_metacmd_ID_project_fkey_command = 138;
|
||||
static int32_t fcoder_metacmd_ID_project_go_to_root_directory = 139;
|
||||
static int32_t fcoder_metacmd_ID_query_replace = 140;
|
||||
static int32_t fcoder_metacmd_ID_query_replace_identifier = 141;
|
||||
static int32_t fcoder_metacmd_ID_query_replace_selection = 142;
|
||||
static int32_t fcoder_metacmd_ID_redo = 143;
|
||||
static int32_t fcoder_metacmd_ID_reload_themes = 144;
|
||||
static int32_t fcoder_metacmd_ID_remap_interactive = 145;
|
||||
static int32_t fcoder_metacmd_ID_rename_file_query = 146;
|
||||
static int32_t fcoder_metacmd_ID_reopen = 147;
|
||||
static int32_t fcoder_metacmd_ID_replace_in_range = 148;
|
||||
static int32_t fcoder_metacmd_ID_reverse_search = 149;
|
||||
static int32_t fcoder_metacmd_ID_reverse_search_identifier = 150;
|
||||
static int32_t fcoder_metacmd_ID_save = 151;
|
||||
static int32_t fcoder_metacmd_ID_save_all_dirty_buffers = 152;
|
||||
static int32_t fcoder_metacmd_ID_save_to_query = 153;
|
||||
static int32_t fcoder_metacmd_ID_scope_absorb_down = 154;
|
||||
static int32_t fcoder_metacmd_ID_search = 155;
|
||||
static int32_t fcoder_metacmd_ID_search_identifier = 156;
|
||||
static int32_t fcoder_metacmd_ID_seek_alphanumeric_left = 157;
|
||||
static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_left = 158;
|
||||
static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_right = 159;
|
||||
static int32_t fcoder_metacmd_ID_seek_alphanumeric_right = 160;
|
||||
static int32_t fcoder_metacmd_ID_seek_beginning_of_line = 161;
|
||||
static int32_t fcoder_metacmd_ID_seek_beginning_of_textual_line = 162;
|
||||
static int32_t fcoder_metacmd_ID_seek_end_of_line = 163;
|
||||
static int32_t fcoder_metacmd_ID_seek_end_of_textual_line = 164;
|
||||
static int32_t fcoder_metacmd_ID_seek_token_left = 165;
|
||||
static int32_t fcoder_metacmd_ID_seek_token_right = 166;
|
||||
static int32_t fcoder_metacmd_ID_seek_white_or_token_left = 167;
|
||||
static int32_t fcoder_metacmd_ID_seek_white_or_token_right = 168;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_down = 169;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_down_end_line = 170;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_left = 171;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_right = 172;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_up = 173;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_up_end_line = 174;
|
||||
static int32_t fcoder_metacmd_ID_select_all = 175;
|
||||
static int32_t fcoder_metacmd_ID_set_bindings_choose = 176;
|
||||
static int32_t fcoder_metacmd_ID_set_bindings_default = 177;
|
||||
static int32_t fcoder_metacmd_ID_set_bindings_mac_default = 178;
|
||||
static int32_t fcoder_metacmd_ID_set_mark = 179;
|
||||
static int32_t fcoder_metacmd_ID_set_mode_to_notepad_like = 180;
|
||||
static int32_t fcoder_metacmd_ID_set_mode_to_original = 181;
|
||||
static int32_t fcoder_metacmd_ID_setup_build_bat = 182;
|
||||
static int32_t fcoder_metacmd_ID_setup_build_bat_and_sh = 183;
|
||||
static int32_t fcoder_metacmd_ID_setup_build_sh = 184;
|
||||
|
@ -647,21 +651,23 @@ static int32_t fcoder_metacmd_ID_to_lowercase = 193;
|
|||
static int32_t fcoder_metacmd_ID_to_uppercase = 194;
|
||||
static int32_t fcoder_metacmd_ID_toggle_filebar = 195;
|
||||
static int32_t fcoder_metacmd_ID_toggle_fullscreen = 196;
|
||||
static int32_t fcoder_metacmd_ID_toggle_highlight_line_at_cursor = 197;
|
||||
static int32_t fcoder_metacmd_ID_toggle_line_wrap = 198;
|
||||
static int32_t fcoder_metacmd_ID_toggle_mouse = 199;
|
||||
static int32_t fcoder_metacmd_ID_toggle_show_whitespace = 200;
|
||||
static int32_t fcoder_metacmd_ID_toggle_virtual_whitespace = 201;
|
||||
static int32_t fcoder_metacmd_ID_undo = 202;
|
||||
static int32_t fcoder_metacmd_ID_view_buffer_other_panel = 203;
|
||||
static int32_t fcoder_metacmd_ID_view_jump_list_with_lister = 204;
|
||||
static int32_t fcoder_metacmd_ID_word_complete = 205;
|
||||
static int32_t fcoder_metacmd_ID_write_and_auto_tab = 206;
|
||||
static int32_t fcoder_metacmd_ID_write_block = 207;
|
||||
static int32_t fcoder_metacmd_ID_write_character = 208;
|
||||
static int32_t fcoder_metacmd_ID_write_hack = 209;
|
||||
static int32_t fcoder_metacmd_ID_write_note = 210;
|
||||
static int32_t fcoder_metacmd_ID_write_todo = 211;
|
||||
static int32_t fcoder_metacmd_ID_write_underscore = 212;
|
||||
static int32_t fcoder_metacmd_ID_write_zero_struct = 213;
|
||||
static int32_t fcoder_metacmd_ID_toggle_highlight_enclosing_scopes = 197;
|
||||
static int32_t fcoder_metacmd_ID_toggle_highlight_line_at_cursor = 198;
|
||||
static int32_t fcoder_metacmd_ID_toggle_line_wrap = 199;
|
||||
static int32_t fcoder_metacmd_ID_toggle_mouse = 200;
|
||||
static int32_t fcoder_metacmd_ID_toggle_paren_matching_helper = 201;
|
||||
static int32_t fcoder_metacmd_ID_toggle_show_whitespace = 202;
|
||||
static int32_t fcoder_metacmd_ID_toggle_virtual_whitespace = 203;
|
||||
static int32_t fcoder_metacmd_ID_undo = 204;
|
||||
static int32_t fcoder_metacmd_ID_view_buffer_other_panel = 205;
|
||||
static int32_t fcoder_metacmd_ID_view_jump_list_with_lister = 206;
|
||||
static int32_t fcoder_metacmd_ID_word_complete = 207;
|
||||
static int32_t fcoder_metacmd_ID_write_and_auto_tab = 208;
|
||||
static int32_t fcoder_metacmd_ID_write_block = 209;
|
||||
static int32_t fcoder_metacmd_ID_write_character = 210;
|
||||
static int32_t fcoder_metacmd_ID_write_hack = 211;
|
||||
static int32_t fcoder_metacmd_ID_write_note = 212;
|
||||
static int32_t fcoder_metacmd_ID_write_todo = 213;
|
||||
static int32_t fcoder_metacmd_ID_write_underscore = 214;
|
||||
static int32_t fcoder_metacmd_ID_write_zero_struct = 215;
|
||||
#endif
|
||||
|
|
|
@ -45,24 +45,38 @@ bind_vanilla_keys(context, write_character);
|
|||
bind(context, key_mouse_left, MDFR_NONE, click_set_cursor_and_mark);
|
||||
bind(context, key_mouse_left_release, MDFR_NONE, click_set_cursor);
|
||||
bind(context, key_mouse_move, MDFR_NONE, click_set_cursor_if_lbutton);
|
||||
bind(context, key_left, MDFR_NONE, move_left);
|
||||
bind(context, key_right, MDFR_NONE, move_right);
|
||||
bind(context, key_del, MDFR_NONE, delete_char);
|
||||
bind(context, key_del, MDFR_SHIFT, delete_char);
|
||||
bind(context, key_back, MDFR_NONE, backspace_char);
|
||||
bind(context, key_back, MDFR_SHIFT, backspace_char);
|
||||
bind(context, key_up, MDFR_NONE, move_up);
|
||||
bind(context, key_down, MDFR_NONE, move_down);
|
||||
bind(context, key_left, MDFR_NONE, move_left);
|
||||
bind(context, key_right, MDFR_NONE, move_right);
|
||||
bind(context, key_up, MDFR_SHIFT, move_up);
|
||||
bind(context, key_down, MDFR_SHIFT, move_down);
|
||||
bind(context, key_left, MDFR_SHIFT, move_left);
|
||||
bind(context, key_right, MDFR_SHIFT, move_right);
|
||||
bind(context, key_end, MDFR_NONE, seek_end_of_line);
|
||||
bind(context, key_home, MDFR_NONE, seek_beginning_of_line);
|
||||
bind(context, key_page_up, MDFR_CTRL, goto_beginning_of_file);
|
||||
bind(context, key_page_down, MDFR_CTRL, goto_end_of_file);
|
||||
bind(context, key_page_up, MDFR_NONE, page_up);
|
||||
bind(context, key_page_down, MDFR_NONE, page_down);
|
||||
bind(context, key_right, MDFR_CTRL, seek_whitespace_right);
|
||||
bind(context, key_left, MDFR_CTRL, seek_whitespace_left);
|
||||
bind(context, key_end, MDFR_SHIFT, seek_end_of_line);
|
||||
bind(context, key_home, MDFR_SHIFT, seek_beginning_of_line);
|
||||
bind(context, key_page_up, MDFR_CTRL|MDFR_SHIFT, goto_beginning_of_file);
|
||||
bind(context, key_page_down, MDFR_CTRL|MDFR_SHIFT, goto_end_of_file);
|
||||
bind(context, key_page_up, MDFR_SHIFT, page_up);
|
||||
bind(context, key_page_down, MDFR_SHIFT, page_down);
|
||||
bind(context, key_up, MDFR_CTRL, seek_whitespace_up_end_line);
|
||||
bind(context, key_down, MDFR_CTRL, seek_whitespace_down_end_line);
|
||||
bind(context, key_right, MDFR_CTRL, seek_whitespace_right);
|
||||
bind(context, key_left, MDFR_CTRL, seek_whitespace_left);
|
||||
bind(context, key_up, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_up_end_line);
|
||||
bind(context, key_down, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_down_end_line);
|
||||
bind(context, key_right, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_right);
|
||||
bind(context, key_left, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_left);
|
||||
bind(context, key_up, MDFR_ALT, move_line_up);
|
||||
bind(context, key_down, MDFR_ALT, move_line_down);
|
||||
bind(context, key_back, MDFR_CTRL, backspace_word);
|
||||
|
@ -203,24 +217,38 @@ bind_vanilla_keys(context, MDFR_ALT, write_character);
|
|||
bind(context, key_mouse_left, MDFR_NONE, click_set_cursor_and_mark);
|
||||
bind(context, key_mouse_left_release, MDFR_NONE, click_set_cursor);
|
||||
bind(context, key_mouse_move, MDFR_NONE, click_set_cursor_if_lbutton);
|
||||
bind(context, key_left, MDFR_NONE, move_left);
|
||||
bind(context, key_right, MDFR_NONE, move_right);
|
||||
bind(context, key_del, MDFR_NONE, delete_char);
|
||||
bind(context, key_del, MDFR_SHIFT, delete_char);
|
||||
bind(context, key_back, MDFR_NONE, backspace_char);
|
||||
bind(context, key_back, MDFR_SHIFT, backspace_char);
|
||||
bind(context, key_up, MDFR_NONE, move_up);
|
||||
bind(context, key_down, MDFR_NONE, move_down);
|
||||
bind(context, key_left, MDFR_NONE, move_left);
|
||||
bind(context, key_right, MDFR_NONE, move_right);
|
||||
bind(context, key_up, MDFR_SHIFT, move_up);
|
||||
bind(context, key_down, MDFR_SHIFT, move_down);
|
||||
bind(context, key_left, MDFR_SHIFT, move_left);
|
||||
bind(context, key_right, MDFR_SHIFT, move_right);
|
||||
bind(context, key_end, MDFR_NONE, seek_end_of_line);
|
||||
bind(context, key_home, MDFR_NONE, seek_beginning_of_line);
|
||||
bind(context, key_page_up, MDFR_CTRL, goto_beginning_of_file);
|
||||
bind(context, key_page_down, MDFR_CTRL, goto_end_of_file);
|
||||
bind(context, key_page_up, MDFR_NONE, page_up);
|
||||
bind(context, key_page_down, MDFR_NONE, page_down);
|
||||
bind(context, key_right, MDFR_CMND, seek_whitespace_right);
|
||||
bind(context, key_left, MDFR_CMND, seek_whitespace_left);
|
||||
bind(context, key_end, MDFR_SHIFT, seek_end_of_line);
|
||||
bind(context, key_home, MDFR_SHIFT, seek_beginning_of_line);
|
||||
bind(context, key_page_up, MDFR_CTRL|MDFR_SHIFT, goto_beginning_of_file);
|
||||
bind(context, key_page_down, MDFR_CTRL|MDFR_SHIFT, goto_end_of_file);
|
||||
bind(context, key_page_up, MDFR_SHIFT, page_up);
|
||||
bind(context, key_page_down, MDFR_SHIFT, page_down);
|
||||
bind(context, key_up, MDFR_CMND, seek_whitespace_up_end_line);
|
||||
bind(context, key_down, MDFR_CMND, seek_whitespace_down_end_line);
|
||||
bind(context, key_right, MDFR_CMND, seek_whitespace_right);
|
||||
bind(context, key_left, MDFR_CMND, seek_whitespace_left);
|
||||
bind(context, key_up, MDFR_CMND|MDFR_SHIFT, seek_whitespace_up_end_line);
|
||||
bind(context, key_down, MDFR_CMND|MDFR_SHIFT, seek_whitespace_down_end_line);
|
||||
bind(context, key_right, MDFR_CMND|MDFR_SHIFT, seek_whitespace_right);
|
||||
bind(context, key_left, MDFR_CMND|MDFR_SHIFT, seek_whitespace_left);
|
||||
bind(context, key_up, MDFR_ALT, move_line_up);
|
||||
bind(context, key_down, MDFR_ALT, move_line_down);
|
||||
bind(context, key_back, MDFR_CMND, backspace_word);
|
||||
|
@ -385,29 +413,43 @@ static Meta_Key_Bind fcoder_binds_for_default_mapid_global[38] = {
|
|||
{0, 55330, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55312, 0, "mouse_wheel_scroll", 18, LINK_PROCS(mouse_wheel_scroll)},
|
||||
};
|
||||
static Meta_Key_Bind fcoder_binds_for_default_mapid_file[63] = {
|
||||
static Meta_Key_Bind fcoder_binds_for_default_mapid_file[77] = {
|
||||
{1, 0, 0, "write_character", 15, LINK_PROCS(write_character)},
|
||||
{0, 55308, 0, "click_set_cursor_and_mark", 25, LINK_PROCS(click_set_cursor_and_mark)},
|
||||
{0, 55310, 0, "click_set_cursor", 16, LINK_PROCS(click_set_cursor)},
|
||||
{0, 55313, 0, "click_set_cursor_if_lbutton", 27, LINK_PROCS(click_set_cursor_if_lbutton)},
|
||||
{0, 55299, 0, "move_left", 9, LINK_PROCS(move_left)},
|
||||
{0, 55300, 0, "move_right", 10, LINK_PROCS(move_right)},
|
||||
{0, 55301, 0, "delete_char", 11, LINK_PROCS(delete_char)},
|
||||
{0, 55301, 8, "delete_char", 11, LINK_PROCS(delete_char)},
|
||||
{0, 55296, 0, "backspace_char", 14, LINK_PROCS(backspace_char)},
|
||||
{0, 55296, 8, "backspace_char", 14, LINK_PROCS(backspace_char)},
|
||||
{0, 55297, 0, "move_up", 7, LINK_PROCS(move_up)},
|
||||
{0, 55298, 0, "move_down", 9, LINK_PROCS(move_down)},
|
||||
{0, 55299, 0, "move_left", 9, LINK_PROCS(move_left)},
|
||||
{0, 55300, 0, "move_right", 10, LINK_PROCS(move_right)},
|
||||
{0, 55297, 8, "move_up", 7, LINK_PROCS(move_up)},
|
||||
{0, 55298, 8, "move_down", 9, LINK_PROCS(move_down)},
|
||||
{0, 55299, 8, "move_left", 9, LINK_PROCS(move_left)},
|
||||
{0, 55300, 8, "move_right", 10, LINK_PROCS(move_right)},
|
||||
{0, 55304, 0, "seek_end_of_line", 16, LINK_PROCS(seek_end_of_line)},
|
||||
{0, 55303, 0, "seek_beginning_of_line", 22, LINK_PROCS(seek_beginning_of_line)},
|
||||
{0, 55305, 1, "goto_beginning_of_file", 22, LINK_PROCS(goto_beginning_of_file)},
|
||||
{0, 55306, 1, "goto_end_of_file", 16, LINK_PROCS(goto_end_of_file)},
|
||||
{0, 55305, 0, "page_up", 7, LINK_PROCS(page_up)},
|
||||
{0, 55306, 0, "page_down", 9, LINK_PROCS(page_down)},
|
||||
{0, 55300, 1, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
|
||||
{0, 55299, 1, "seek_whitespace_left", 20, LINK_PROCS(seek_whitespace_left)},
|
||||
{0, 55304, 8, "seek_end_of_line", 16, LINK_PROCS(seek_end_of_line)},
|
||||
{0, 55303, 8, "seek_beginning_of_line", 22, LINK_PROCS(seek_beginning_of_line)},
|
||||
{0, 55305, 9, "goto_beginning_of_file", 22, LINK_PROCS(goto_beginning_of_file)},
|
||||
{0, 55306, 9, "goto_end_of_file", 16, LINK_PROCS(goto_end_of_file)},
|
||||
{0, 55305, 8, "page_up", 7, LINK_PROCS(page_up)},
|
||||
{0, 55306, 8, "page_down", 9, LINK_PROCS(page_down)},
|
||||
{0, 55297, 1, "seek_whitespace_up_end_line", 27, LINK_PROCS(seek_whitespace_up_end_line)},
|
||||
{0, 55298, 1, "seek_whitespace_down_end_line", 29, LINK_PROCS(seek_whitespace_down_end_line)},
|
||||
{0, 55300, 1, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
|
||||
{0, 55299, 1, "seek_whitespace_left", 20, LINK_PROCS(seek_whitespace_left)},
|
||||
{0, 55297, 9, "seek_whitespace_up_end_line", 27, LINK_PROCS(seek_whitespace_up_end_line)},
|
||||
{0, 55298, 9, "seek_whitespace_down_end_line", 29, LINK_PROCS(seek_whitespace_down_end_line)},
|
||||
{0, 55300, 9, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
|
||||
{0, 55299, 9, "seek_whitespace_left", 20, LINK_PROCS(seek_whitespace_left)},
|
||||
{0, 55297, 2, "move_line_up", 12, LINK_PROCS(move_line_up)},
|
||||
{0, 55298, 2, "move_line_down", 14, LINK_PROCS(move_line_down)},
|
||||
{0, 55296, 1, "backspace_word", 14, LINK_PROCS(backspace_word)},
|
||||
|
@ -501,7 +543,7 @@ static Meta_Key_Bind fcoder_binds_for_default_default_lister_ui_map[14] = {
|
|||
};
|
||||
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, 38},
|
||||
{"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, 63},
|
||||
{"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, 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_default_default_code_map, 31},
|
||||
{"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, 14},
|
||||
};
|
||||
|
@ -545,30 +587,44 @@ static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_global[38] = {
|
|||
{0, 55330, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)},
|
||||
{0, 55312, 0, "mouse_wheel_scroll", 18, LINK_PROCS(mouse_wheel_scroll)},
|
||||
};
|
||||
static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_file[62] = {
|
||||
static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_file[76] = {
|
||||
{1, 0, 0, "write_character", 15, LINK_PROCS(write_character)},
|
||||
{1, 0, 2, "write_character", 15, LINK_PROCS(write_character)},
|
||||
{0, 55308, 0, "click_set_cursor_and_mark", 25, LINK_PROCS(click_set_cursor_and_mark)},
|
||||
{0, 55310, 0, "click_set_cursor", 16, LINK_PROCS(click_set_cursor)},
|
||||
{0, 55313, 0, "click_set_cursor_if_lbutton", 27, LINK_PROCS(click_set_cursor_if_lbutton)},
|
||||
{0, 55299, 0, "move_left", 9, LINK_PROCS(move_left)},
|
||||
{0, 55300, 0, "move_right", 10, LINK_PROCS(move_right)},
|
||||
{0, 55301, 0, "delete_char", 11, LINK_PROCS(delete_char)},
|
||||
{0, 55301, 8, "delete_char", 11, LINK_PROCS(delete_char)},
|
||||
{0, 55296, 0, "backspace_char", 14, LINK_PROCS(backspace_char)},
|
||||
{0, 55296, 8, "backspace_char", 14, LINK_PROCS(backspace_char)},
|
||||
{0, 55297, 0, "move_up", 7, LINK_PROCS(move_up)},
|
||||
{0, 55298, 0, "move_down", 9, LINK_PROCS(move_down)},
|
||||
{0, 55299, 0, "move_left", 9, LINK_PROCS(move_left)},
|
||||
{0, 55300, 0, "move_right", 10, LINK_PROCS(move_right)},
|
||||
{0, 55297, 8, "move_up", 7, LINK_PROCS(move_up)},
|
||||
{0, 55298, 8, "move_down", 9, LINK_PROCS(move_down)},
|
||||
{0, 55299, 8, "move_left", 9, LINK_PROCS(move_left)},
|
||||
{0, 55300, 8, "move_right", 10, LINK_PROCS(move_right)},
|
||||
{0, 55304, 0, "seek_end_of_line", 16, LINK_PROCS(seek_end_of_line)},
|
||||
{0, 55303, 0, "seek_beginning_of_line", 22, LINK_PROCS(seek_beginning_of_line)},
|
||||
{0, 55305, 1, "goto_beginning_of_file", 22, LINK_PROCS(goto_beginning_of_file)},
|
||||
{0, 55306, 1, "goto_end_of_file", 16, LINK_PROCS(goto_end_of_file)},
|
||||
{0, 55305, 0, "page_up", 7, LINK_PROCS(page_up)},
|
||||
{0, 55306, 0, "page_down", 9, LINK_PROCS(page_down)},
|
||||
{0, 55300, 4, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
|
||||
{0, 55299, 4, "seek_whitespace_left", 20, LINK_PROCS(seek_whitespace_left)},
|
||||
{0, 55304, 8, "seek_end_of_line", 16, LINK_PROCS(seek_end_of_line)},
|
||||
{0, 55303, 8, "seek_beginning_of_line", 22, LINK_PROCS(seek_beginning_of_line)},
|
||||
{0, 55305, 9, "goto_beginning_of_file", 22, LINK_PROCS(goto_beginning_of_file)},
|
||||
{0, 55306, 9, "goto_end_of_file", 16, LINK_PROCS(goto_end_of_file)},
|
||||
{0, 55305, 8, "page_up", 7, LINK_PROCS(page_up)},
|
||||
{0, 55306, 8, "page_down", 9, LINK_PROCS(page_down)},
|
||||
{0, 55297, 4, "seek_whitespace_up_end_line", 27, LINK_PROCS(seek_whitespace_up_end_line)},
|
||||
{0, 55298, 4, "seek_whitespace_down_end_line", 29, LINK_PROCS(seek_whitespace_down_end_line)},
|
||||
{0, 55300, 4, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
|
||||
{0, 55299, 4, "seek_whitespace_left", 20, LINK_PROCS(seek_whitespace_left)},
|
||||
{0, 55297, 12, "seek_whitespace_up_end_line", 27, LINK_PROCS(seek_whitespace_up_end_line)},
|
||||
{0, 55298, 12, "seek_whitespace_down_end_line", 29, LINK_PROCS(seek_whitespace_down_end_line)},
|
||||
{0, 55300, 12, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
|
||||
{0, 55299, 12, "seek_whitespace_left", 20, LINK_PROCS(seek_whitespace_left)},
|
||||
{0, 55297, 2, "move_line_up", 12, LINK_PROCS(move_line_up)},
|
||||
{0, 55298, 2, "move_line_down", 14, LINK_PROCS(move_line_down)},
|
||||
{0, 55296, 4, "backspace_word", 14, LINK_PROCS(backspace_word)},
|
||||
|
@ -660,7 +716,7 @@ static Meta_Key_Bind fcoder_binds_for_mac_default_default_lister_ui_map[14] = {
|
|||
};
|
||||
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, 38},
|
||||
{"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, 62},
|
||||
{"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, 76},
|
||||
{"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, 31},
|
||||
{"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},
|
||||
};
|
||||
|
|
|
@ -34,6 +34,14 @@ Stag_Highlight_White,
|
|||
Stag_Paste,
|
||||
Stag_Undo,
|
||||
Stag_Next_Undo,
|
||||
Stag_Back_Cycle_1,
|
||||
Stag_Back_Cycle_2,
|
||||
Stag_Back_Cycle_3,
|
||||
Stag_Back_Cycle_4,
|
||||
Stag_Text_Cycle_1,
|
||||
Stag_Text_Cycle_2,
|
||||
Stag_Text_Cycle_3,
|
||||
Stag_Text_Cycle_4,
|
||||
Stag_COUNT
|
||||
};
|
||||
|
||||
|
@ -73,4 +81,12 @@ static char *style_tag_names[] = {
|
|||
"Paste",
|
||||
"Undo",
|
||||
"Next_Undo",
|
||||
"Back_Cycle_1",
|
||||
"Back_Cycle_2",
|
||||
"Back_Cycle_3",
|
||||
"Back_Cycle_4",
|
||||
"Text_Cycle_1",
|
||||
"Text_Cycle_2",
|
||||
"Text_Cycle_3",
|
||||
"Text_Cycle_4",
|
||||
};
|
||||
|
|
|
@ -1417,5 +1417,55 @@ get_ranges_of_duplicate_keys(Partition *arena, int32_t *keys, int32_t stride, in
|
|||
return(result);
|
||||
}
|
||||
|
||||
static void
|
||||
no_mark_snap_to_cursor(Application_Links *app, Managed_Scope view_scope){
|
||||
managed_variable_set(app, view_scope, view_snap_mark_to_cursor, false);
|
||||
}
|
||||
|
||||
static void
|
||||
no_mark_snap_to_cursor(Application_Links *app, View_ID view_id){
|
||||
Managed_Scope scope = view_get_managed_scope(app, view_id);
|
||||
no_mark_snap_to_cursor(app, scope);
|
||||
}
|
||||
|
||||
static void
|
||||
no_mark_snap_to_cursor_if_shift(Application_Links *app, View_ID view_id){
|
||||
User_Input in = get_command_input(app);
|
||||
if (in.type == UserInputKey && in.key.modifiers[MDFR_SHIFT_INDEX]){
|
||||
no_mark_snap_to_cursor(app, view_id);
|
||||
}
|
||||
}
|
||||
|
||||
static bool32
|
||||
view_has_highlighted_range(Application_Links *app, View_ID view_id){
|
||||
if (fcoder_mode == FCoderMode_NotepadLike){
|
||||
View_Summary view = get_view(app, view_id, AccessAll);
|
||||
return(view.cursor.pos != view.mark.pos);
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
|
||||
static bool32
|
||||
if_view_has_highlighted_range_delete_range(Application_Links *app, View_ID view_id){
|
||||
if (view_has_highlighted_range(app, view_id)){
|
||||
View_Summary view = get_view(app, view_id, AccessAll);
|
||||
Range range = get_view_range(&view);
|
||||
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessOpen);
|
||||
buffer_replace_range(app, &buffer, range.min, range.max, 0, 0);
|
||||
return(true);
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
|
||||
static void
|
||||
begin_notepad_mode(Application_Links *app){
|
||||
fcoder_mode = FCoderMode_NotepadLike;
|
||||
for (View_Summary view = get_view_first(app, AccessAll);
|
||||
view.exists;
|
||||
get_view_next(app, &view, AccessAll)){
|
||||
view_set_mark(app, &view, seek_pos(view.cursor.pos));
|
||||
}
|
||||
}
|
||||
|
||||
// BOTTOM
|
||||
|
||||
|
|
|
@ -148,27 +148,20 @@ init_marker_list(Application_Links *app, Partition *scratch, Heap *heap, Buffer_
|
|||
}
|
||||
}
|
||||
|
||||
Marker_Visuals_Type marker_type = 0;
|
||||
uint32_t marker_color = 0;
|
||||
|
||||
if (is_compilation_buffer){
|
||||
marker_type = BufferMarkersType_LineHighlights;
|
||||
Theme_Color color = {};
|
||||
color.tag = Stag_Highlight_Junk;
|
||||
get_theme_colors(app, &color, 1);
|
||||
marker_color = color.color;
|
||||
}
|
||||
else{
|
||||
marker_type = BufferMarkersType_Invisible;
|
||||
marker_color = 0;
|
||||
}
|
||||
|
||||
scope_array[1] = buffer_get_managed_scope(app, target_buffer_id);
|
||||
Managed_Scope scope = get_managed_scope_with_multiple_dependencies(app, scope_array, ArrayCount(scope_array));
|
||||
Managed_Object marker_handle = alloc_buffer_markers_on_buffer(app, target_buffer_id, total_jump_count, &scope);
|
||||
managed_object_store_data(app, marker_handle, 0, total_jump_count, markers);
|
||||
Marker_Visuals visuals = create_marker_visuals(app, marker_handle);
|
||||
marker_visuals_set_look(app, visuals, marker_type, marker_color, SymbolicColor_Default, 0);
|
||||
|
||||
if (is_compilation_buffer){
|
||||
Theme_Color color = {};
|
||||
color.tag = Stag_Highlight_Junk;
|
||||
get_theme_colors(app, &color, 1);
|
||||
Marker_Visuals visuals = create_marker_visuals(app, marker_handle);
|
||||
marker_visuals_set_look(app, visuals,
|
||||
BufferMarkersType_LineHighlights, color.color, 0, 0);
|
||||
}
|
||||
|
||||
end_temp_memory(marker_temp);
|
||||
|
||||
Assert(managed_object_get_item_size(app, marker_handle) == sizeof(Marker));
|
||||
|
|
|
@ -21,7 +21,7 @@ ms_style_verify(String line, int32_t left_paren_pos, int32_t right_paren_pos){
|
|||
int32_t comma_pos = find_s_char(number, 0, ',');
|
||||
if (comma_pos < number.size){
|
||||
String sub_number0 = substr(number, 0, comma_pos);
|
||||
String sub_number1 = substr(number, comma_pos, number.size - comma_pos - 1);
|
||||
String sub_number1 = substr(number, comma_pos + 1, number.size - comma_pos - 1);
|
||||
if (str_is_int_s(sub_number0) && str_is_int_s(sub_number1)){
|
||||
result = true;
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ struct Heap{
|
|||
Heap_Basic_Node free_nodes;
|
||||
};
|
||||
|
||||
#define DO_HEAP_CHECKS
|
||||
//#define DO_HEAP_CHECKS
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -9,11 +9,41 @@ static float scope_center_threshold = 0.75f;
|
|||
|
||||
////////////////////////////////
|
||||
|
||||
static Find_Scope_Token_Type
|
||||
find_scope_get_token_type(uint32_t flags, Cpp_Token_Type token_type){
|
||||
Find_Scope_Token_Type type = FindScopeTokenType_None;
|
||||
if (flags & FindScope_Brace){
|
||||
switch (token_type){
|
||||
case CPP_TOKEN_BRACE_OPEN:
|
||||
{
|
||||
type = FindScopeTokenType_Open;
|
||||
}break;
|
||||
case CPP_TOKEN_BRACE_CLOSE:
|
||||
{
|
||||
type = FindScopeTokenType_Close;
|
||||
}break;
|
||||
}
|
||||
}
|
||||
if (flags & FindScope_Paren){
|
||||
switch (token_type){
|
||||
case CPP_TOKEN_PARENTHESE_OPEN:
|
||||
{
|
||||
type = FindScopeTokenType_Open;
|
||||
}break;
|
||||
case CPP_TOKEN_PARENTHESE_CLOSE:
|
||||
{
|
||||
type = FindScopeTokenType_Close;
|
||||
}break;
|
||||
}
|
||||
}
|
||||
return(type);
|
||||
}
|
||||
|
||||
static bool32
|
||||
find_scope_top(Application_Links *app, Buffer_Summary *buffer, int32_t start_pos, uint32_t flags, int32_t *end_pos_out){
|
||||
Cpp_Get_Token_Result get_result = {0};
|
||||
|
||||
bool32 success = 0;
|
||||
bool32 success = false;
|
||||
int32_t position = 0;
|
||||
|
||||
if (buffer_get_token_index(app, buffer, start_pos, &get_result)){
|
||||
|
@ -31,16 +61,16 @@ find_scope_top(Application_Links *app, Buffer_Summary *buffer, int32_t start_pos
|
|||
Stream_Tokens stream = {0};
|
||||
|
||||
if (init_stream_tokens(&stream, app, buffer, token_index, chunk, chunk_cap)){int32_t nest_level = 0;
|
||||
bool32 still_looping = 0;
|
||||
bool32 still_looping = false;
|
||||
do{
|
||||
for (; token_index >= stream.start; --token_index){
|
||||
Cpp_Token *token = &stream.tokens[token_index];
|
||||
|
||||
switch (token->type){
|
||||
case CPP_TOKEN_BRACE_OPEN:
|
||||
Find_Scope_Token_Type type = find_scope_get_token_type(flags, token->type);
|
||||
switch (type){
|
||||
case FindScopeTokenType_Open:
|
||||
{
|
||||
if (nest_level == 0){
|
||||
success = 1;
|
||||
success = true;
|
||||
position = token->start;
|
||||
if (flags & FindScope_EndOfToken){
|
||||
position += token->size;
|
||||
|
@ -51,8 +81,7 @@ find_scope_top(Application_Links *app, Buffer_Summary *buffer, int32_t start_pos
|
|||
--nest_level;
|
||||
}
|
||||
}break;
|
||||
|
||||
case CPP_TOKEN_BRACE_CLOSE:
|
||||
case FindScopeTokenType_Close:
|
||||
{
|
||||
++nest_level;
|
||||
}break;
|
||||
|
@ -73,7 +102,7 @@ static bool32
|
|||
find_scope_bottom(Application_Links *app, Buffer_Summary *buffer, int32_t start_pos, uint32_t flags, int32_t *end_pos_out){
|
||||
Cpp_Get_Token_Result get_result = {0};
|
||||
|
||||
bool32 success = 0;
|
||||
bool32 success = false;
|
||||
int32_t position = 0;
|
||||
|
||||
if (buffer_get_token_index(app, buffer, start_pos, &get_result)){
|
||||
|
@ -92,21 +121,20 @@ find_scope_bottom(Application_Links *app, Buffer_Summary *buffer, int32_t start_
|
|||
|
||||
if (init_stream_tokens(&stream, app, buffer, token_index, chunk, chunk_cap)){
|
||||
int32_t nest_level = 0;
|
||||
bool32 still_looping = 0;
|
||||
bool32 still_looping = false;
|
||||
do{
|
||||
for (; token_index < stream.end; ++token_index){
|
||||
Cpp_Token *token = &stream.tokens[token_index];
|
||||
|
||||
switch (token->type){
|
||||
case CPP_TOKEN_BRACE_OPEN:
|
||||
Find_Scope_Token_Type type = find_scope_get_token_type(flags, token->type);
|
||||
switch (type){
|
||||
case FindScopeTokenType_Open:
|
||||
{
|
||||
++nest_level;
|
||||
}break;
|
||||
|
||||
case CPP_TOKEN_BRACE_CLOSE:
|
||||
case FindScopeTokenType_Close:
|
||||
{
|
||||
if (nest_level == 0){
|
||||
success = 1;
|
||||
success = true;
|
||||
position = token->start;
|
||||
if (flags & FindScope_EndOfToken){
|
||||
position += token->size;
|
||||
|
@ -149,13 +177,13 @@ find_next_scope(Application_Links *app, Buffer_Summary *buffer, int32_t start_po
|
|||
if (flags & FindScope_NextSibling){
|
||||
int32_t nest_level = 1;
|
||||
|
||||
bool32 still_looping = 0;
|
||||
bool32 still_looping = false;
|
||||
do{
|
||||
for (; token_index < stream.end; ++token_index){
|
||||
Cpp_Token *token = &stream.tokens[token_index];
|
||||
|
||||
switch (token->type){
|
||||
case CPP_TOKEN_BRACE_OPEN:
|
||||
Find_Scope_Token_Type type = find_scope_get_token_type(flags, token->type);
|
||||
switch (type){
|
||||
case FindScopeTokenType_Open:
|
||||
{
|
||||
if (nest_level == 0){
|
||||
success = 1;
|
||||
|
@ -169,8 +197,7 @@ find_next_scope(Application_Links *app, Buffer_Summary *buffer, int32_t start_po
|
|||
++nest_level;
|
||||
}
|
||||
}break;
|
||||
|
||||
case CPP_TOKEN_BRACE_CLOSE:
|
||||
case FindScopeTokenType_Close:
|
||||
{
|
||||
--nest_level;
|
||||
if (nest_level == -1){
|
||||
|
@ -184,12 +211,12 @@ find_next_scope(Application_Links *app, Buffer_Summary *buffer, int32_t start_po
|
|||
}while(still_looping);
|
||||
}
|
||||
else{
|
||||
bool32 still_looping = 0;
|
||||
bool32 still_looping = false;
|
||||
do{
|
||||
for (; token_index < stream.end; ++token_index){
|
||||
Cpp_Token *token = &stream.tokens[token_index];
|
||||
|
||||
if (token->type == CPP_TOKEN_BRACE_OPEN){
|
||||
Find_Scope_Token_Type type = find_scope_get_token_type(flags, token->type);
|
||||
if (type == FindScopeTokenType_Open){
|
||||
success = 1;
|
||||
position = token->start;
|
||||
if (flags & FindScope_EndOfToken){
|
||||
|
@ -232,9 +259,9 @@ find_prev_scope(Application_Links *app, Buffer_Summary *buffer, int32_t start_po
|
|||
do{
|
||||
for (; token_index >= stream.start; --token_index){
|
||||
Cpp_Token *token = &stream.tokens[token_index];
|
||||
|
||||
switch (token->type){
|
||||
case CPP_TOKEN_BRACE_OPEN:
|
||||
Find_Scope_Token_Type type = find_scope_get_token_type(flags, token->type);
|
||||
switch (type){
|
||||
case FindScopeTokenType_Open:
|
||||
{
|
||||
if (nest_level == -1){
|
||||
position = start_pos;
|
||||
|
@ -252,8 +279,7 @@ find_prev_scope(Application_Links *app, Buffer_Summary *buffer, int32_t start_po
|
|||
--nest_level;
|
||||
}
|
||||
}break;
|
||||
|
||||
case CPP_TOKEN_BRACE_CLOSE:
|
||||
case FindScopeTokenType_Close:
|
||||
{
|
||||
++nest_level;
|
||||
}break;
|
||||
|
@ -267,8 +293,8 @@ find_prev_scope(Application_Links *app, Buffer_Summary *buffer, int32_t start_po
|
|||
do{
|
||||
for (; token_index >= stream.start; --token_index){
|
||||
Cpp_Token *token = &stream.tokens[token_index];
|
||||
|
||||
if (token->type == CPP_TOKEN_BRACE_OPEN){
|
||||
Find_Scope_Token_Type type = find_scope_get_token_type(flags, token->type);
|
||||
if (type == FindScopeTokenType_Open){
|
||||
success = 1;
|
||||
position = token->start;
|
||||
if (flags & FindScope_EndOfToken){
|
||||
|
@ -290,10 +316,15 @@ find_prev_scope(Application_Links *app, Buffer_Summary *buffer, int32_t start_po
|
|||
}
|
||||
|
||||
static bool32
|
||||
find_scope_range(Application_Links *app, Buffer_Summary *buffer, int32_t start_pos, Range *range_out){
|
||||
find_scope_range(Application_Links *app, Buffer_Summary *buffer, int32_t start_pos, Range *range_out,
|
||||
uint32_t flags){
|
||||
Range range = {0};
|
||||
if (find_scope_top(app, buffer, start_pos, FindScope_Parent, &range.start)){
|
||||
if (find_scope_bottom(app, buffer, start_pos, FindScope_Parent|FindScope_EndOfToken, &range.end)){
|
||||
if (find_scope_top(app, buffer, start_pos,
|
||||
FindScope_Parent|flags,
|
||||
&range.start)){
|
||||
if (find_scope_bottom(app, buffer, start_pos,
|
||||
FindScope_Parent|FindScope_EndOfToken|flags,
|
||||
&range.end)){
|
||||
*range_out = range;
|
||||
return(true);
|
||||
}
|
||||
|
@ -309,7 +340,8 @@ view_set_to_region(Application_Links *app, View_Summary *view, int32_t major_pos
|
|||
bottom_major = true;
|
||||
}
|
||||
|
||||
Full_Cursor top, bottom;
|
||||
Full_Cursor top = {0};
|
||||
Full_Cursor bottom = {0};
|
||||
if (view_compute_cursor(app, view, seek_pos(range.min), &top)){
|
||||
if (view_compute_cursor(app, view, seek_pos(range.max), &bottom)){
|
||||
float top_y = top.wrapped_y;
|
||||
|
@ -358,7 +390,7 @@ CUSTOM_DOC("Finds the scope enclosed by '{' '}' surrounding the cursor and puts
|
|||
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
|
||||
|
||||
Range range = {0};
|
||||
if (find_scope_range(app, &buffer, view.cursor.pos, &range)){
|
||||
if (find_scope_range(app, &buffer, view.cursor.pos, &range, FindScope_Brace)){
|
||||
view_set_cursor(app, &view, seek_pos(range.first), true);
|
||||
view_set_mark(app, &view, seek_pos(range.end));
|
||||
view_set_to_region(app, &view, range.first, range.end, scope_center_threshold);
|
||||
|
@ -375,8 +407,8 @@ CUSTOM_DOC("Finds the first scope started by '{' after the cursor and puts the c
|
|||
int32_t start_pos = view.cursor.pos;
|
||||
int32_t top = 0;
|
||||
int32_t bottom = 0;
|
||||
if (find_next_scope(app, &buffer, start_pos, 0, &top)){
|
||||
if (find_scope_bottom(app, &buffer, top, FindScope_EndOfToken, &bottom)){
|
||||
if (find_next_scope(app, &buffer, start_pos, FindScope_Brace, &top)){
|
||||
if (find_scope_bottom(app, &buffer, top, FindScope_EndOfToken|FindScope_Brace, &bottom)){
|
||||
view_set_cursor(app, &view, seek_pos(top), true);
|
||||
view_set_mark(app, &view, seek_pos(bottom));
|
||||
view_set_to_region(app, &view, top, bottom, scope_center_threshold);
|
||||
|
@ -393,8 +425,8 @@ CUSTOM_DOC("Finds the first scope started by '{' before the cursor and puts the
|
|||
|
||||
int32_t start_pos = view.cursor.pos;
|
||||
int32_t top = 0, bottom = 0;
|
||||
if (find_prev_scope(app, &buffer, start_pos, 0, &top)){
|
||||
if (find_scope_bottom(app, &buffer, top, FindScope_EndOfToken, &bottom)){
|
||||
if (find_prev_scope(app, &buffer, start_pos, FindScope_Brace, &top)){
|
||||
if (find_scope_bottom(app, &buffer, top, FindScope_EndOfToken|FindScope_Brace, &bottom)){
|
||||
view_set_cursor(app, &view, seek_pos(top), true);
|
||||
view_set_mark(app, &view, seek_pos(bottom));
|
||||
view_set_to_region(app, &view, top, bottom, scope_center_threshold);
|
||||
|
@ -410,9 +442,8 @@ place_begin_and_end_on_own_lines(Application_Links *app, Partition *scratch, cha
|
|||
Range lines = {0};
|
||||
Range range = get_view_range(&view);
|
||||
lines.min = buffer_get_line_number(app, &buffer, range.min);
|
||||
range.min = buffer_get_line_start(app, &buffer, lines.min);
|
||||
|
||||
lines.max = buffer_get_line_number(app, &buffer, range.max);
|
||||
range.min = buffer_get_line_start(app, &buffer, lines.min);
|
||||
range.max = buffer_get_line_end(app, &buffer, lines.max);
|
||||
|
||||
bool32 do_full = (lines.min < lines.max) || (!buffer_line_is_blank(app, &buffer, lines.min));
|
||||
|
|
|
@ -8,9 +8,11 @@
|
|||
#define FCODER_SCOPE_COMMANDS_H
|
||||
|
||||
enum{
|
||||
FindScope_Parent = 0x1,
|
||||
FindScope_NextSibling = 0x1,
|
||||
FindScope_EndOfToken = 0x2,
|
||||
FindScope_Parent = 1,
|
||||
FindScope_NextSibling = 2,
|
||||
FindScope_EndOfToken = 4,
|
||||
FindScope_Brace = 8,
|
||||
FindScope_Paren = 16,
|
||||
};
|
||||
|
||||
struct Statement_Parser{
|
||||
|
@ -19,6 +21,13 @@ struct Statement_Parser{
|
|||
Buffer_Summary *buffer;
|
||||
};
|
||||
|
||||
typedef int32_t Find_Scope_Token_Type;
|
||||
enum{
|
||||
FindScopeTokenType_None = 0,
|
||||
FindScopeTokenType_Open = 1,
|
||||
FindScopeTokenType_Close = 2,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// BOTTOM
|
||||
|
|
|
@ -1023,6 +1023,7 @@ view_buffer_boundary_seek_set_pos(Application_Links *app, View_Summary *view, Bu
|
|||
int32_t dir, uint32_t flags){
|
||||
int32_t pos = buffer_boundary_seek(app, buffer, &global_part, view->cursor.pos, dir, flags);
|
||||
view_set_cursor(app, view, seek_pos(pos), true);
|
||||
no_mark_snap_to_cursor_if_shift(app, view->view_id);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1094,6 +1095,7 @@ CUSTOM_DOC("Seeks the cursor up to the next blank line.")
|
|||
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessProtected);
|
||||
int32_t new_pos = buffer_seek_whitespace_up(app, &buffer, view.cursor.pos);
|
||||
view_set_cursor(app, &view, seek_pos(new_pos), true);
|
||||
no_mark_snap_to_cursor_if_shift(app, view.view_id);
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(seek_whitespace_down)
|
||||
|
@ -1103,6 +1105,7 @@ CUSTOM_DOC("Seeks the cursor down to the next blank line.")
|
|||
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessProtected);
|
||||
int32_t new_pos = buffer_seek_whitespace_down(app, &buffer, view.cursor.pos);
|
||||
view_set_cursor(app, &view, seek_pos(new_pos), true);
|
||||
no_mark_snap_to_cursor_if_shift(app, view.view_id);
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(seek_beginning_of_textual_line)
|
||||
|
@ -1112,6 +1115,7 @@ CUSTOM_DOC("Seeks the cursor to the beginning of the line across all text.")
|
|||
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessProtected);
|
||||
int32_t new_pos = seek_line_beginning(app, &buffer, view.cursor.pos);
|
||||
view_set_cursor(app, &view, seek_pos(new_pos), true);
|
||||
no_mark_snap_to_cursor_if_shift(app, view.view_id);
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(seek_end_of_textual_line)
|
||||
|
@ -1121,6 +1125,7 @@ CUSTOM_DOC("Seeks the cursor to the end of the line across all text.")
|
|||
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessProtected);
|
||||
int32_t new_pos = seek_line_end(app, &buffer, view.cursor.pos);
|
||||
view_set_cursor(app, &view, seek_pos(new_pos), true);
|
||||
no_mark_snap_to_cursor_if_shift(app, view.view_id);
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(seek_beginning_of_line)
|
||||
|
@ -1132,6 +1137,7 @@ CUSTOM_DOC("Seeks the cursor to the beginning of the visual line.")
|
|||
y = view.cursor.unwrapped_y;
|
||||
}
|
||||
view_set_cursor(app, &view, seek_xy(0, y, 1, view.unwrapped_lines), 1);
|
||||
no_mark_snap_to_cursor_if_shift(app, view.view_id);
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(seek_end_of_line)
|
||||
|
@ -1143,6 +1149,7 @@ CUSTOM_DOC("Seeks the cursor to the end of the visual line.")
|
|||
y = view.cursor.unwrapped_y;
|
||||
}
|
||||
view_set_cursor(app, &view, seek_xy(max_f32, y, 1, view.unwrapped_lines), 1);
|
||||
no_mark_snap_to_cursor_if_shift(app, view.view_id);
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(seek_whitespace_up_end_line)
|
||||
|
@ -1153,6 +1160,7 @@ CUSTOM_DOC("Seeks the cursor up to the next blank line and places it at the end
|
|||
int32_t new_pos = buffer_seek_whitespace_up(app, &buffer, view.cursor.pos);
|
||||
new_pos = seek_line_end(app, &buffer, new_pos);
|
||||
view_set_cursor(app, &view, seek_pos(new_pos), true);
|
||||
no_mark_snap_to_cursor_if_shift(app, view.view_id);
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(seek_whitespace_down_end_line)
|
||||
|
@ -1163,6 +1171,7 @@ CUSTOM_DOC("Seeks the cursor down to the next blank line and places it at the en
|
|||
int32_t new_pos = buffer_seek_whitespace_down(app, &buffer, view.cursor.pos);
|
||||
new_pos = seek_line_end(app, &buffer, new_pos);
|
||||
view_set_cursor(app, &view, seek_pos(new_pos), true);
|
||||
no_mark_snap_to_cursor_if_shift(app, view.view_id);
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(goto_beginning_of_file)
|
||||
|
@ -1170,6 +1179,7 @@ CUSTOM_DOC("Sets the cursor to the beginning of the file.")
|
|||
{
|
||||
View_Summary view = get_active_view(app, AccessProtected);
|
||||
view_set_cursor(app, &view, seek_pos(0), true);
|
||||
no_mark_snap_to_cursor_if_shift(app, view.view_id);
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(goto_end_of_file)
|
||||
|
@ -1178,6 +1188,7 @@ CUSTOM_DOC("Sets the cursor to the end of the file.")
|
|||
View_Summary view = get_active_view(app, AccessProtected);
|
||||
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessProtected);
|
||||
view_set_cursor(app, &view, seek_pos(buffer.size), true);
|
||||
no_mark_snap_to_cursor_if_shift(app, view.view_id);
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
|
|
|
@ -2572,7 +2572,7 @@ Create_Marker_Visuals(Application_Links *app, Managed_Object object){
|
|||
if (object_ptrs.header != 0 && object_ptrs.header->type == ManagedObjectType_Markers){
|
||||
Heap *heap = &models->mem.heap;
|
||||
Dynamic_Workspace *workspace = object_ptrs.workspace;
|
||||
Marker_Visuals_Data *data = marker_visuals_alloc(heap, &workspace->mem_bank, &workspace->visuals_allocator);
|
||||
Marker_Visuals_Data *data = dynamic_workspace_alloc_visuals(heap, &workspace->mem_bank, workspace);
|
||||
|
||||
Managed_Buffer_Markers_Header *markers = (Managed_Buffer_Markers_Header*)object_ptrs.header;
|
||||
zdll_push_back(markers->visuals_first, markers->visuals_last, data);
|
||||
|
@ -2616,7 +2616,20 @@ Marker_Visuals_Set_Take_Rule(Application_Links *app, Marker_Visuals visuals, Mar
|
|||
Models *models = cmd->models;
|
||||
Marker_Visuals_Data *data = get_marker_visuals_pointer(models, visuals);
|
||||
if (data != 0){
|
||||
Assert(take_rule.take_count_per_step != 0);
|
||||
take_rule.first_index = clamp_bottom(0, take_rule.first_index);
|
||||
take_rule.take_count_per_step = clamp_bottom(1, take_rule.take_count_per_step);
|
||||
take_rule.step_stride_in_marker_count = clamp_bottom(take_rule.take_count_per_step, take_rule.step_stride_in_marker_count);
|
||||
data->take_rule = take_rule;
|
||||
if (data->take_rule.maximum_number_of_markers != 0){
|
||||
i32 whole_steps = take_rule.maximum_number_of_markers/take_rule.take_count_per_step;
|
||||
i32 extra_in_last = take_rule.maximum_number_of_markers%take_rule.take_count_per_step;
|
||||
whole_steps = whole_steps + (extra_in_last > 0?1:0);
|
||||
data->one_past_last_take_index = take_rule.first_index + whole_steps*take_rule.step_stride_in_marker_count + extra_in_last;
|
||||
}
|
||||
else{
|
||||
data->one_past_last_take_index = max_i32;
|
||||
}
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
|
@ -3363,7 +3376,7 @@ DOC_SEE(Theme_Color)
|
|||
for (i32 i = 0; i < count; ++i, ++theme_color){
|
||||
int_color *color = style_index_by_tag(&style->main, theme_color->tag);
|
||||
if (color != 0){
|
||||
*color = theme_color->color | 0xFF000000;
|
||||
*color = theme_color->color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3382,7 +3395,7 @@ DOC_SEE(Theme_Color)
|
|||
for (i32 i = 0; i < count; ++i, ++theme_color){
|
||||
u32 *color = style_index_by_tag(&style->main, theme_color->tag);
|
||||
if (color != 0){
|
||||
theme_color->color = *color | 0xFF000000;
|
||||
theme_color->color = *color;
|
||||
}
|
||||
else{
|
||||
theme_color->color = 0xFF000000;
|
||||
|
|
|
@ -40,9 +40,12 @@ struct Command_Data{
|
|||
|
||||
// Render Context
|
||||
View *render_view;
|
||||
i32_Rect render_rect;
|
||||
b32 render_is_active;
|
||||
Render_Target *target;
|
||||
i32_Rect render_rect;
|
||||
Full_Cursor render_cursor;
|
||||
Range render_range;
|
||||
Buffer_Render_Item *render_items;
|
||||
i32 render_item_count;
|
||||
};
|
||||
|
||||
struct Models{
|
||||
|
|
|
@ -190,7 +190,8 @@ marker_visuals_allocator_init(Marker_Visuals_Allocator *allocator){
|
|||
}
|
||||
|
||||
internal Marker_Visuals_Data*
|
||||
marker_visuals_alloc(Heap *heap, Dynamic_Memory_Bank *mem_bank, Marker_Visuals_Allocator *allocator){
|
||||
dynamic_workspace_alloc_visuals(Heap *heap, Dynamic_Memory_Bank *mem_bank, Dynamic_Workspace *workspace){
|
||||
Marker_Visuals_Allocator *allocator = &workspace->visuals_allocator;
|
||||
if (allocator->free_count == 0){
|
||||
i32 new_slots_count = clamp_bottom(16, allocator->total_visual_count);
|
||||
i32 memsize = new_slots_count*sizeof(Marker_Visuals_Data);
|
||||
|
@ -201,7 +202,7 @@ marker_visuals_alloc(Heap *heap, Dynamic_Memory_Bank *mem_bank, Marker_Visuals_A
|
|||
allocator->total_visual_count += new_slots_count;
|
||||
for (i32 i = 0; i < new_slots_count; i += 1, new_slot += 1){
|
||||
zdll_push_back(allocator->free_first, allocator->free_last, new_slot);
|
||||
new_slot->slot_id = ++allocator->slot_id_counter;
|
||||
new_slot->slot_id = ++workspace->visual_id_counter;
|
||||
insert_u32_Ptr_table(heap, mem_bank, &allocator->id_to_ptr_table, new_slot->slot_id, new_slot);
|
||||
}
|
||||
}
|
||||
|
@ -242,7 +243,8 @@ marker_visuals_defaults(Marker_Visuals_Data *data){
|
|||
data->take_rule.take_count_per_step = 1;
|
||||
data->take_rule.step_stride_in_marker_count = 1;
|
||||
data->take_rule.maximum_number_of_markers = max_i32;
|
||||
data->priority = VisualPriority_Normal;
|
||||
data->one_past_last_take_index = max_i32;
|
||||
data->priority = VisualPriority_Default;
|
||||
data->key_view_id = 0;
|
||||
}
|
||||
|
||||
|
@ -250,6 +252,7 @@ marker_visuals_defaults(Marker_Visuals_Data *data){
|
|||
|
||||
internal void
|
||||
dynamic_workspace_init(Heap *heap, Lifetime_Allocator *lifetime_allocator, i32 user_type, void *user_back_ptr, Dynamic_Workspace *workspace){
|
||||
memset(workspace, 0, sizeof(*workspace));
|
||||
dynamic_variables_block_init(heap, &workspace->var_block);
|
||||
dynamic_memory_bank_init(heap, &workspace->mem_bank);
|
||||
marker_visuals_allocator_init(&workspace->visuals_allocator);
|
||||
|
@ -273,6 +276,8 @@ internal void
|
|||
dynamic_workspace_clear_contents(Heap *heap, Dynamic_Workspace *workspace){
|
||||
dynamic_variables_block_free(heap, &workspace->var_block);
|
||||
dynamic_memory_bank_free_all(heap, &workspace->mem_bank);
|
||||
memset(&workspace->object_id_to_object_ptr, 0, sizeof(workspace->object_id_to_object_ptr));
|
||||
memset(&workspace->buffer_markers_list, 0, sizeof(workspace->buffer_markers_list));
|
||||
dynamic_variables_block_init(heap, &workspace->var_block);
|
||||
dynamic_memory_bank_init(heap, &workspace->mem_bank);
|
||||
marker_visuals_allocator_init(&workspace->visuals_allocator);
|
||||
|
@ -594,6 +599,21 @@ lifetime__object_free_all_keys(Heap *heap, Lifetime_Allocator *lifetime_allocato
|
|||
}
|
||||
}
|
||||
|
||||
internal void
|
||||
lifetime__object_clear_all_keys(Heap *heap, Lifetime_Allocator *lifetime_allocator, Lifetime_Object *lifetime_object){
|
||||
i32 key_i = 0;
|
||||
for (Lifetime_Key_Ref_Node *node = lifetime_object->key_node_first;
|
||||
node != 0;
|
||||
node = node->next){
|
||||
i32 one_past_last = clamp_top(ArrayCount(node->keys), lifetime_object->key_count - key_i);
|
||||
Lifetime_Key **key_ptr = node->keys;
|
||||
for (i32 i = 0; i < one_past_last; i += 1, key_ptr += 1){
|
||||
dynamic_workspace_clear_contents(heap, &(*key_ptr)->dynamic_workspace);
|
||||
}
|
||||
key_i += one_past_last;
|
||||
}
|
||||
}
|
||||
|
||||
internal void
|
||||
lifetime_free_object(Heap *heap, Lifetime_Allocator *lifetime_allocator, Lifetime_Object *lifetime_object){
|
||||
lifetime__object_free_all_keys(heap, lifetime_allocator, lifetime_object);
|
||||
|
@ -603,10 +623,7 @@ lifetime_free_object(Heap *heap, Lifetime_Allocator *lifetime_allocator, Lifetim
|
|||
|
||||
internal void
|
||||
lifetime_object_reset(Heap *heap, Lifetime_Allocator *lifetime_allocator, Lifetime_Object *lifetime_object){
|
||||
lifetime__object_free_all_keys(heap, lifetime_allocator, lifetime_object);
|
||||
lifetime_object->key_node_first = 0;
|
||||
lifetime_object->key_node_last = 0;
|
||||
lifetime_object->key_count = 0;
|
||||
lifetime__object_clear_all_keys(heap, lifetime_allocator, lifetime_object);
|
||||
dynamic_workspace_clear_contents(heap, &lifetime_object->workspace);
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ struct Marker_Visuals_Data{
|
|||
Marker_Visuals_Text_Style text_style;
|
||||
// "Take Rule"
|
||||
Marker_Visuals_Take_Rule take_rule;
|
||||
i32 one_past_last_take_index;
|
||||
// "Priority"
|
||||
Marker_Visuals_Priority_Level priority;
|
||||
// "Key View ID"
|
||||
|
@ -60,7 +61,6 @@ struct Marker_Visuals_Allocator{
|
|||
i32 free_count;
|
||||
i32 total_visual_count;
|
||||
u32_Ptr_Table id_to_ptr_table;
|
||||
u32 slot_id_counter;
|
||||
};
|
||||
|
||||
global_const i32 managed_header_type_sizes[ManagedObjectType_COUNT] = {
|
||||
|
@ -116,6 +116,7 @@ struct Dynamic_Workspace{
|
|||
Marker_Visuals_Allocator visuals_allocator;
|
||||
u32_Ptr_Table object_id_to_object_ptr;
|
||||
u32 object_id_counter;
|
||||
u32 visual_id_counter;
|
||||
u32 scope_id;
|
||||
i32 user_type;
|
||||
void *user_back_ptr;
|
||||
|
|
|
@ -37,6 +37,14 @@ u32 highlight_white_color;
|
|||
u32 paste_color;
|
||||
u32 undo_color;
|
||||
u32 next_undo_color;
|
||||
u32 back_cycle_1_color;
|
||||
u32 back_cycle_2_color;
|
||||
u32 back_cycle_3_color;
|
||||
u32 back_cycle_4_color;
|
||||
u32 text_cycle_1_color;
|
||||
u32 text_cycle_2_color;
|
||||
u32 text_cycle_3_color;
|
||||
u32 text_cycle_4_color;
|
||||
Interactive_Style file_info_style;
|
||||
};
|
||||
|
||||
|
@ -79,6 +87,14 @@ case Stag_Highlight_White: result = &s->highlight_white_color; break;
|
|||
case Stag_Paste: result = &s->paste_color; break;
|
||||
case Stag_Undo: result = &s->undo_color; break;
|
||||
case Stag_Next_Undo: result = &s->next_undo_color; break;
|
||||
case Stag_Back_Cycle_1: result = &s->back_cycle_1_color; break;
|
||||
case Stag_Back_Cycle_2: result = &s->back_cycle_2_color; break;
|
||||
case Stag_Back_Cycle_3: result = &s->back_cycle_3_color; break;
|
||||
case Stag_Back_Cycle_4: result = &s->back_cycle_4_color; break;
|
||||
case Stag_Text_Cycle_1: result = &s->text_cycle_1_color; break;
|
||||
case Stag_Text_Cycle_2: result = &s->text_cycle_2_color; break;
|
||||
case Stag_Text_Cycle_3: result = &s->text_cycle_3_color; break;
|
||||
case Stag_Text_Cycle_4: result = &s->text_cycle_4_color; break;
|
||||
}
|
||||
return(result);
|
||||
}
|
||||
|
|
635
4ed_view.cpp
635
4ed_view.cpp
|
@ -490,8 +490,9 @@ release_font_and_update_files(System_Functions *system, Models *models, Face_ID
|
|||
////////////////////////////////
|
||||
|
||||
internal void
|
||||
get_visual_markers(Partition *arena, Dynamic_Workspace *workspace, i32 *range_counter_ptr,
|
||||
Range range, Buffer_ID buffer_id, i32 view_index){
|
||||
get_visual_markers(Partition *arena, Dynamic_Workspace *workspace,
|
||||
Range range, Buffer_ID buffer_id, i32 view_index,
|
||||
Style_Main_Data *style_data){
|
||||
View_ID view_id = view_index + 1;
|
||||
for (Managed_Buffer_Markers_Header *node = workspace->buffer_markers_list.first;
|
||||
node != 0;
|
||||
|
@ -506,61 +507,131 @@ get_visual_markers(Partition *arena, Dynamic_Workspace *workspace, i32 *range_co
|
|||
Marker_Visuals_Type type = data->type;
|
||||
u32 color = data->color;
|
||||
u32 text_color = data->text_color;
|
||||
i32 take_count_per_step = data->take_rule.take_count_per_step;
|
||||
i32 step_stride_in_marker_count = data->take_rule.step_stride_in_marker_count;
|
||||
i32 stride_size_from_last = step_stride_in_marker_count - take_count_per_step;
|
||||
i32 priority = data->priority;
|
||||
|
||||
if ((color&SymbolicColor__StagColorFlag) && (color&0xFF000000) == 0){
|
||||
u32 *c = style_index_by_tag(style_data, color&0x007FFFFF);
|
||||
if (c != 0){
|
||||
color = *c;
|
||||
}
|
||||
else{
|
||||
color = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ((text_color&SymbolicColor__StagColorFlag) && (text_color&0xFF000000) == 0){
|
||||
u32 *c = style_index_by_tag(style_data, text_color&0x007FFFFF);
|
||||
if (c != 0){
|
||||
text_color = *c;
|
||||
}
|
||||
else{
|
||||
text_color = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Marker *markers = (Marker*)(node + 1);
|
||||
Assert(sizeof(*markers) == node->std_header.item_size);
|
||||
i32 count = node->std_header.count;
|
||||
i32 one_past_last_index = clamp_top(data->one_past_last_take_index, count);
|
||||
|
||||
if (type != BufferMarkersType_CharacterHighlightRanges){
|
||||
Marker *marker = markers;
|
||||
for (i32 i = 0; i < count; i += 1, marker += 1){
|
||||
if (range.first <= marker->pos &&
|
||||
marker->pos <= range.one_past_last){
|
||||
Render_Marker *render_marker = push_array(arena, Render_Marker, 1);
|
||||
render_marker->type = type;
|
||||
render_marker->pos = marker->pos;
|
||||
render_marker->color = color;
|
||||
render_marker->text_color = text_color;
|
||||
render_marker->range_id = -1;
|
||||
Marker *marker_one_past_last = markers + one_past_last_index;
|
||||
Marker *marker = markers + data->take_rule.first_index;
|
||||
|
||||
switch (type){
|
||||
default:
|
||||
{
|
||||
for (;marker < marker_one_past_last; marker += stride_size_from_last){
|
||||
for (i32 i = 0;
|
||||
i < take_count_per_step && marker < marker_one_past_last;
|
||||
marker += 1, i += 1){
|
||||
if (range.first <= marker->pos && marker->pos <= range.one_past_last){
|
||||
Render_Marker *render_marker = push_array(arena, Render_Marker, 1);
|
||||
render_marker->type = type;
|
||||
render_marker->pos = marker->pos;
|
||||
render_marker->color = color;
|
||||
render_marker->text_color = text_color;
|
||||
render_marker->one_past_last = marker->pos;
|
||||
render_marker->priority = priority;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
Marker *marker = markers;
|
||||
for (i32 i = 0; i + 1 < count; i += 2, marker += 2){
|
||||
Range range_b = {0};
|
||||
range_b.first = marker[0].pos;
|
||||
range_b.one_past_last = marker[1].pos;
|
||||
}break;
|
||||
|
||||
case BufferMarkersType_CharacterHighlightRanges:
|
||||
case BufferMarkersType_LineHighlightRanges:
|
||||
{
|
||||
i32 pos_pair[2] = {0};
|
||||
i32 pair_index = 0;
|
||||
|
||||
if (range_b.first >= range_b.one_past_last) continue;
|
||||
if (!((range.min - range_b.max <= 0) &&
|
||||
(range.max - range_b.min >= 0))) continue;
|
||||
|
||||
i32 range_id = *range_counter_ptr;
|
||||
*range_counter_ptr += 2;
|
||||
for (i32 j = 0; j < 2; j += 1){
|
||||
Render_Marker *render_marker = push_array(arena, Render_Marker, 1);
|
||||
render_marker->type = type;
|
||||
render_marker->pos = marker[j].pos;
|
||||
render_marker->color = color;
|
||||
render_marker->text_color = text_color;
|
||||
render_marker->range_id = range_id + j;
|
||||
for (;marker < marker_one_past_last; marker += stride_size_from_last){
|
||||
for (i32 i = 0;
|
||||
i < take_count_per_step && marker < marker_one_past_last;
|
||||
marker += 1, i += 1){
|
||||
pos_pair[pair_index++] = marker->pos;
|
||||
if (pair_index == 2){
|
||||
pair_index = 0;
|
||||
|
||||
Range range_b = {0};
|
||||
range_b.first = pos_pair[0];
|
||||
range_b.one_past_last = pos_pair[1];
|
||||
|
||||
if (range_b.first == range_b.one_past_last) continue;
|
||||
if (range_b.first > range_b.one_past_last){
|
||||
Swap(i32, range_b.first, range_b.one_past_last);
|
||||
}
|
||||
if (!((range.min - range_b.max <= 0) &&
|
||||
(range.max - range_b.min >= 0))) continue;
|
||||
|
||||
Render_Marker *render_marker = push_array(arena, Render_Marker, 1);
|
||||
render_marker->type = type;
|
||||
render_marker->pos = range_b.min;
|
||||
render_marker->color = color;
|
||||
render_marker->text_color = text_color;
|
||||
render_marker->one_past_last = range_b.max;
|
||||
render_marker->priority = priority;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal void
|
||||
visual_markers_segment_sort(Render_Marker *markers, i32 first, i32 one_past_last, Range *ranges_out){
|
||||
// NOTE(allen): This sort only works for a two segment sort, if we end up wanting more segments,
|
||||
// scrap it and try again.
|
||||
internal i32
|
||||
marker_type_to_segment_rank(Marker_Visuals_Type type){
|
||||
switch (type){
|
||||
case BufferMarkersType_LineHighlights:
|
||||
{
|
||||
return(1);
|
||||
}break;
|
||||
case BufferMarkersType_CharacterHighlightRanges:
|
||||
{
|
||||
return(2);
|
||||
}break;
|
||||
case BufferMarkersType_LineHighlightRanges:
|
||||
{
|
||||
return(3);
|
||||
}break;
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
global_const i32 max_visual_type_rank = 3;
|
||||
|
||||
internal i32
|
||||
split_sort(Render_Marker *markers, i32 first, i32 one_past_last, i32 min_in_high_segment){
|
||||
i32 i1 = first;
|
||||
i32 i0 = one_past_last - 1;
|
||||
for (;;){
|
||||
for (; i1 < one_past_last && markers[i1].type != BufferMarkersType_LineHighlights; i1 += 1);
|
||||
for (; i0 >= 0 && markers[i0].type == BufferMarkersType_LineHighlights; i0 -= 1);
|
||||
for (;i1 < one_past_last &&
|
||||
marker_type_to_segment_rank(markers[i1].type) < min_in_high_segment;
|
||||
i1 += 1);
|
||||
for (;i0 >= 0 &&
|
||||
marker_type_to_segment_rank(markers[i0].type) >= min_in_high_segment;
|
||||
i0 -= 1);
|
||||
if (i1 < i0){
|
||||
Swap(Render_Marker, markers[i0], markers[i1]);
|
||||
}
|
||||
|
@ -568,10 +639,19 @@ visual_markers_segment_sort(Render_Marker *markers, i32 first, i32 one_past_last
|
|||
break;
|
||||
}
|
||||
}
|
||||
ranges_out[0].first = 0;
|
||||
ranges_out[0].one_past_last = i1;
|
||||
ranges_out[1].first = i1;
|
||||
ranges_out[1].one_past_last = one_past_last;
|
||||
return(i1);
|
||||
}
|
||||
|
||||
internal void
|
||||
visual_markers_segment_sort(Render_Marker *markers, i32 first, i32 one_past_last, Range *ranges_out){
|
||||
i32 pos = first;
|
||||
for (i32 i = 0; i < max_visual_type_rank; i += 1){
|
||||
ranges_out[i].first = pos;
|
||||
pos = split_sort(markers, pos, one_past_last, i + 1);
|
||||
ranges_out[i].one_past_last = pos;
|
||||
}
|
||||
ranges_out[max_visual_type_rank].first = pos;
|
||||
ranges_out[max_visual_type_rank].one_past_last = one_past_last;
|
||||
}
|
||||
|
||||
internal void
|
||||
|
@ -611,7 +691,6 @@ internal void
|
|||
visual_markers_replace_pos_with_first_byte_of_line(Render_Marker_Array markers, i32 *line_starts, i32 line_count, i32 hint_line_index){
|
||||
if (markers.count > 0){
|
||||
Assert(0 <= hint_line_index && hint_line_index < line_count);
|
||||
Assert(line_starts[hint_line_index] <= markers.markers[0].pos);
|
||||
i32 marker_scan_index = 0;
|
||||
for (i32 line_scan_index = hint_line_index;; line_scan_index += 1){
|
||||
Assert(line_scan_index < line_count);
|
||||
|
@ -636,145 +715,74 @@ visual_markers_replace_pos_with_first_byte_of_line(Render_Marker_Array markers,
|
|||
}
|
||||
}
|
||||
|
||||
internal i32
|
||||
range_record_stack_get_insert_index(Render_Range_Record *records, i32 count, i32 priority){
|
||||
i32 insert_pos = 0;
|
||||
i32 first = 0;
|
||||
i32 one_past_last = count + 1;
|
||||
for (;;){
|
||||
if (first + 1 >= one_past_last){
|
||||
insert_pos = first;
|
||||
break;
|
||||
}
|
||||
i32 mid = (first + one_past_last)/2;
|
||||
// i - 1 is too big?
|
||||
b32 too_big = false;
|
||||
if (mid > 0){
|
||||
if (records[mid - 1].priority > priority){
|
||||
too_big = true;
|
||||
}
|
||||
}
|
||||
// i is too small?
|
||||
b32 too_small = false;
|
||||
if (!too_big && mid < count){
|
||||
if (records[mid].priority <= priority){
|
||||
too_small = true;
|
||||
}
|
||||
}
|
||||
// bisect
|
||||
if (too_big){
|
||||
one_past_last = mid;
|
||||
}
|
||||
else if (too_small){
|
||||
first = mid + 1;
|
||||
}
|
||||
else{
|
||||
insert_pos = mid;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return(insert_pos);
|
||||
}
|
||||
|
||||
internal void
|
||||
render_loaded_file_in_view(System_Functions *system, View *view, Models *models,
|
||||
i32_Rect rect, b32 is_active, Render_Target *target){
|
||||
render_loaded_file_in_view__inner(Models *models, Render_Target *target, View *view,
|
||||
i32_Rect rect, Full_Cursor render_cursor, Range on_screen_range,
|
||||
Buffer_Render_Item *items, i32 item_count){
|
||||
Editing_File *file = view->transient.file_data.file;
|
||||
Partition *part = &models->mem.part;
|
||||
Style *style = &models->styles.styles[0];
|
||||
i32 line_height = view->transient.line_height;
|
||||
|
||||
f32 max_x = (f32)file->settings.display_width;
|
||||
i32 max_y = rect.y1 - rect.y0 + line_height;
|
||||
|
||||
Assert(file != 0);
|
||||
Assert(!file->is_dummy);
|
||||
Assert(buffer_good(&file->state.buffer));
|
||||
Assert(view->transient.edit_pos != 0);
|
||||
|
||||
b32 tokens_use = 0;
|
||||
Cpp_Token_Array token_array = {};
|
||||
if (file){
|
||||
tokens_use = file->state.tokens_complete && (file->state.token_array.count > 0);
|
||||
token_array = file->state.token_array;
|
||||
}
|
||||
|
||||
Partition *part = &models->mem.part;
|
||||
Temp_Memory temp = begin_temp_memory(part);
|
||||
|
||||
partition_align(part, 4);
|
||||
|
||||
f32 left_side_space = 0;
|
||||
|
||||
i32 max = partition_remaining(part)/sizeof(Buffer_Render_Item);
|
||||
Buffer_Render_Item *items = push_array(part, Buffer_Render_Item, 0);
|
||||
|
||||
Face_ID font_id = file->settings.font_id;
|
||||
Font_Pointers font = system->font.get_pointers_by_id(font_id);
|
||||
|
||||
f32 scroll_x = view->transient.edit_pos->scroll.scroll_x;
|
||||
f32 scroll_y = view->transient.edit_pos->scroll.scroll_y;
|
||||
|
||||
// NOTE(allen): For now we will temporarily adjust scroll_y to try
|
||||
// to prevent the view moving around until floating sections are added
|
||||
// to the gui system.
|
||||
scroll_y += view->transient.widget_height;
|
||||
|
||||
Full_Cursor render_cursor = {0};
|
||||
if (!file->settings.unwrapped_lines){
|
||||
render_cursor = file_compute_cursor(system, file, seek_wrapped_xy(0, scroll_y, 0), true);
|
||||
}
|
||||
else{
|
||||
render_cursor = file_compute_cursor(system, file, seek_unwrapped_xy(0, scroll_y, 0), true);
|
||||
}
|
||||
|
||||
view->transient.edit_pos->scroll_i = render_cursor.pos;
|
||||
|
||||
b32 tokens_use = file->state.tokens_complete && (file->state.token_array.count > 0);
|
||||
Cpp_Token_Array token_array = file->state.token_array;
|
||||
b32 wrapped = !file->settings.unwrapped_lines;
|
||||
|
||||
i32 count = 0;
|
||||
i32 end_pos = 0;
|
||||
{
|
||||
Buffer_Render_Params params;
|
||||
params.buffer = &file->state.buffer;
|
||||
params.items = items;
|
||||
params.max = max;
|
||||
params.count = &count;
|
||||
params.port_x = (f32)rect.x0 + left_side_space;
|
||||
params.port_y = (f32)rect.y0;
|
||||
params.clip_w = view_width(view) - left_side_space;
|
||||
params.scroll_x = scroll_x;
|
||||
params.scroll_y = scroll_y;
|
||||
params.width = max_x;
|
||||
params.height = (f32)max_y;
|
||||
params.start_cursor = render_cursor;
|
||||
params.wrapped = wrapped;
|
||||
params.system = system;
|
||||
params.font = font;
|
||||
params.virtual_white = file->settings.virtual_white;
|
||||
params.wrap_slashes = file->settings.wrap_indicator;
|
||||
|
||||
Buffer_Render_State state = {0};
|
||||
Buffer_Layout_Stop stop = {0};
|
||||
|
||||
f32 line_shift = 0.f;
|
||||
b32 do_wrap = 0;
|
||||
i32 wrap_unit_end = 0;
|
||||
|
||||
b32 first_wrap_determination = 1;
|
||||
i32 wrap_array_index = 0;
|
||||
|
||||
do{
|
||||
stop = buffer_render_data(&state, params, line_shift, do_wrap, wrap_unit_end);
|
||||
switch (stop.status){
|
||||
case BLStatus_NeedWrapDetermination:
|
||||
{
|
||||
if (first_wrap_determination){
|
||||
wrap_array_index = binary_search(file->state.wrap_positions, stop.pos, 0, file->state.wrap_position_count);
|
||||
++wrap_array_index;
|
||||
if (file->state.wrap_positions[wrap_array_index] == stop.pos){
|
||||
do_wrap = 1;
|
||||
wrap_unit_end = file->state.wrap_positions[wrap_array_index];
|
||||
}
|
||||
else{
|
||||
do_wrap = 0;
|
||||
wrap_unit_end = file->state.wrap_positions[wrap_array_index];
|
||||
}
|
||||
first_wrap_determination = 0;
|
||||
}
|
||||
else{
|
||||
Assert(stop.pos == wrap_unit_end);
|
||||
do_wrap = 1;
|
||||
++wrap_array_index;
|
||||
wrap_unit_end = file->state.wrap_positions[wrap_array_index];
|
||||
}
|
||||
}break;
|
||||
|
||||
case BLStatus_NeedWrapLineShift:
|
||||
case BLStatus_NeedLineShift:
|
||||
{
|
||||
line_shift = file->state.line_indents[stop.wrap_line_index];
|
||||
}break;
|
||||
}
|
||||
}while(stop.status != BLStatus_Finished);
|
||||
|
||||
end_pos = state.i;
|
||||
}
|
||||
push_array(part, Buffer_Render_Item, count);
|
||||
Face_ID font_id = file->settings.font_id;
|
||||
|
||||
// NOTE(allen): Get visual markers
|
||||
Render_Marker_Array markers = {0};
|
||||
markers.markers = push_array(part, Render_Marker, 0);
|
||||
{
|
||||
Lifetime_Object *lifetime_object = file->lifetime_object;
|
||||
Range range = {0};
|
||||
range.first = render_cursor.pos;
|
||||
range.one_past_last = end_pos;
|
||||
Buffer_ID buffer_id = file->id.id;
|
||||
i32 view_index = view->persistent.id;
|
||||
Style_Main_Data *style_data = &style->main;
|
||||
|
||||
i32 range_counter = 0;
|
||||
get_visual_markers(part, &lifetime_object->workspace, &range_counter,
|
||||
range, buffer_id, view_index);
|
||||
get_visual_markers(part, &lifetime_object->workspace, on_screen_range, buffer_id, view_index, style_data);
|
||||
|
||||
i32 key_count = lifetime_object->key_count;
|
||||
i32 key_index = 0;
|
||||
|
@ -784,16 +792,15 @@ render_loaded_file_in_view(System_Functions *system, View *view, Models *models,
|
|||
i32 local_count = clamp_top(lifetime_key_reference_per_node, key_count - key_index);
|
||||
for (i32 i = 0; i < local_count; i += 1){
|
||||
Lifetime_Key *key = node->keys[i];
|
||||
get_visual_markers(part, &key->dynamic_workspace, &range_counter,
|
||||
range, buffer_id, view_index);
|
||||
get_visual_markers(part, &key->dynamic_workspace, on_screen_range, buffer_id, view_index, style_data);
|
||||
}
|
||||
key_index += count;
|
||||
key_index += local_count;
|
||||
}
|
||||
}
|
||||
markers.count = (i32)(push_array(part, Render_Marker, 0) - markers.markers);
|
||||
|
||||
// NOTE(allen): Sort visual markers by position
|
||||
Range marker_segments[2];
|
||||
Range marker_segments[4];
|
||||
visual_markers_segment_sort(markers.markers, 0, markers.count, marker_segments);
|
||||
for (i32 i = 0; i < ArrayCount(marker_segments); i += 1){
|
||||
visual_markers_quick_sort(markers.markers, marker_segments[i].first, marker_segments[i].one_past_last);
|
||||
|
@ -807,6 +814,20 @@ render_loaded_file_in_view(System_Functions *system, View *view, Models *models,
|
|||
line_markers.markers = markers.markers + marker_segments[1].first;
|
||||
line_markers.count = marker_segments[1].one_past_last - marker_segments[1].first;
|
||||
|
||||
Render_Marker_Array range_markers = {0};
|
||||
range_markers.markers = markers.markers + marker_segments[2].first;
|
||||
range_markers.count = marker_segments[2].one_past_last - marker_segments[2].first;
|
||||
|
||||
Render_Marker_Array line_range_markers = {0};
|
||||
line_range_markers.markers = markers.markers + marker_segments[3].first;
|
||||
line_range_markers.count = marker_segments[3].one_past_last - marker_segments[3].first;
|
||||
|
||||
Render_Range_Record *range_stack = push_array(part, Render_Range_Record, range_markers.count);
|
||||
i32 range_stack_top = -1;
|
||||
|
||||
Render_Range_Record *line_range_stack = push_array(part, Render_Range_Record, line_range_markers.count);
|
||||
i32 line_range_stack_top = -1;
|
||||
|
||||
i32 *line_starts = file->state.buffer.line_starts;
|
||||
i32 line_count = file->state.buffer.line_count;
|
||||
i32 line_scan_index = render_cursor.line - 1;
|
||||
|
@ -833,14 +854,16 @@ render_loaded_file_in_view(System_Functions *system, View *view, Models *models,
|
|||
}
|
||||
|
||||
visual_markers_replace_pos_with_first_byte_of_line(line_markers, line_starts, line_count, line_scan_index);
|
||||
visual_markers_replace_pos_with_first_byte_of_line(line_range_markers, line_starts, line_count, line_scan_index);
|
||||
|
||||
i32 visual_markers_scan_index = 0;
|
||||
i32 visual_markers_range_id = -1;
|
||||
u32 visual_markers_range_color = 0;
|
||||
|
||||
i32 visual_line_markers_scan_index = 0;
|
||||
u32 visual_line_markers_color = 0;
|
||||
|
||||
i32 visual_range_markers_scan_index = 0;
|
||||
i32 visual_line_range_markers_scan_index = 0;
|
||||
|
||||
i32 token_i = 0;
|
||||
u32 main_color = style->main.default_color;
|
||||
u32 special_color = style->main.special_character_color;
|
||||
|
@ -852,7 +875,7 @@ render_loaded_file_in_view(System_Functions *system, View *view, Models *models,
|
|||
}
|
||||
|
||||
Buffer_Render_Item *item = items;
|
||||
Buffer_Render_Item *item_end = item + count;
|
||||
Buffer_Render_Item *item_end = item + item_count;
|
||||
i32 prev_ind = -1;
|
||||
u32 highlight_color = 0;
|
||||
|
||||
|
@ -938,17 +961,44 @@ render_loaded_file_in_view(System_Functions *system, View *view, Models *models,
|
|||
highlight_this_color = highlight_color;
|
||||
}
|
||||
|
||||
// NOTE(allen): Line marker colors
|
||||
// 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 == BufferMarkersType_LineHighlights);
|
||||
visual_line_markers_color = marker->color;
|
||||
|
||||
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 == BufferMarkersType_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 = {0};
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
u32 marker_line_highlight = 0;
|
||||
|
@ -957,9 +1007,17 @@ render_loaded_file_in_view(System_Functions *system, View *view, Models *models,
|
|||
}
|
||||
|
||||
// NOTE(allen): Visual marker colors
|
||||
i32 marker_highlight_best_priority = min_i32;
|
||||
b32 marker_highlight_is_set = false;
|
||||
u32 marker_highlight = 0;
|
||||
u32 marker_highlight_text = 0;
|
||||
|
||||
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){
|
||||
|
@ -967,30 +1025,28 @@ render_loaded_file_in_view(System_Functions *system, View *view, Models *models,
|
|||
switch (marker->type){
|
||||
case BufferMarkersType_CharacterBlocks:
|
||||
{
|
||||
marker_highlight = marker->color;
|
||||
}break;
|
||||
|
||||
case BufferMarkersType_CharacterHighlightRanges:
|
||||
{
|
||||
if (marker->range_id&1){
|
||||
if (visual_markers_range_id == marker->range_id - 1){
|
||||
visual_markers_range_id = -1;
|
||||
}
|
||||
}
|
||||
else{
|
||||
visual_markers_range_id = marker->range_id;
|
||||
visual_markers_range_color = marker->color;
|
||||
if (marker->priority > marker_highlight_best_priority){
|
||||
marker_highlight_is_set = true;
|
||||
marker_highlight = marker->color;
|
||||
marker_highlight_text = marker->text_color;
|
||||
marker_highlight_best_priority = marker->priority;
|
||||
}
|
||||
}break;
|
||||
|
||||
case BufferMarkersType_CharacterWireFrames:
|
||||
{
|
||||
marker_wireframe = marker->color;
|
||||
if (marker->priority > marker_wireframe_best_priority){
|
||||
marker_wireframe = marker->color;
|
||||
marker_wireframe_best_priority = marker->priority;
|
||||
}
|
||||
}break;
|
||||
|
||||
case BufferMarkersType_CharacterIBars:
|
||||
{
|
||||
marker_ibar = marker->color;
|
||||
if (marker->priority > marker_ibar_best_priority){
|
||||
marker_ibar = marker->color;
|
||||
marker_ibar_best_priority = marker->priority;
|
||||
}
|
||||
}break;
|
||||
|
||||
default:
|
||||
|
@ -999,8 +1055,29 @@ render_loaded_file_in_view(System_Functions *system, View *view, Models *models,
|
|||
}break;
|
||||
}
|
||||
}
|
||||
if (visual_markers_range_id != -1 && marker_highlight == 0){
|
||||
marker_highlight = visual_markers_range_color;
|
||||
|
||||
// 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 = {0};
|
||||
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 (!marker_highlight_is_set && range_stack_top >= 0){
|
||||
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
|
||||
|
@ -1035,7 +1112,10 @@ render_loaded_file_in_view(System_Functions *system, View *view, Models *models,
|
|||
}
|
||||
if (color_highlight != 0){
|
||||
draw_rectangle(target, char_rect, color_highlight);
|
||||
char_color = style->main.at_cursor_color;
|
||||
}
|
||||
|
||||
if (marker_highlight_text != SymbolicColor_Default){
|
||||
char_color = marker_highlight_text;
|
||||
}
|
||||
|
||||
u32 fade_color = 0xFFFF00FF;
|
||||
|
@ -1062,6 +1142,161 @@ render_loaded_file_in_view(System_Functions *system, View *view, Models *models,
|
|||
|
||||
prev_ind = ind;
|
||||
}
|
||||
}
|
||||
|
||||
internal void
|
||||
do_core_render(Application_Links *app){
|
||||
Command_Data *cmd = (Command_Data*)app->cmd_context;
|
||||
Models *models = cmd->models;
|
||||
Render_Target *target = cmd->target;
|
||||
View *view = cmd->render_view;
|
||||
i32_Rect rect = cmd->render_rect;
|
||||
Full_Cursor render_cursor = cmd->render_cursor;
|
||||
Range on_screen_range = cmd->render_range;
|
||||
Buffer_Render_Item *items = cmd->render_items;
|
||||
i32 item_count = cmd->render_item_count;
|
||||
|
||||
render_loaded_file_in_view__inner(models, target, view,
|
||||
rect, render_cursor, on_screen_range,
|
||||
items, item_count);
|
||||
}
|
||||
|
||||
internal void
|
||||
render_loaded_file_in_view(System_Functions *system, View *view, Models *models,
|
||||
i32_Rect rect, b32 is_active, Render_Target *target){
|
||||
Editing_File *file = view->transient.file_data.file;
|
||||
i32 line_height = view->transient.line_height;
|
||||
|
||||
f32 max_x = (f32)file->settings.display_width;
|
||||
i32 max_y = rect.y1 - rect.y0 + line_height;
|
||||
|
||||
Assert(file != 0);
|
||||
Assert(!file->is_dummy);
|
||||
Assert(buffer_good(&file->state.buffer));
|
||||
Assert(view->transient.edit_pos != 0);
|
||||
|
||||
Partition *part = &models->mem.part;
|
||||
Temp_Memory temp = begin_temp_memory(part);
|
||||
|
||||
partition_align(part, 4);
|
||||
|
||||
f32 left_side_space = 0;
|
||||
|
||||
i32 max = partition_remaining(part)/sizeof(Buffer_Render_Item);
|
||||
Buffer_Render_Item *items = push_array(part, Buffer_Render_Item, 0);
|
||||
|
||||
b32 wrapped = !file->settings.unwrapped_lines;
|
||||
Face_ID font_id = file->settings.font_id;
|
||||
Font_Pointers font = system->font.get_pointers_by_id(font_id);
|
||||
|
||||
f32 scroll_x = view->transient.edit_pos->scroll.scroll_x;
|
||||
f32 scroll_y = view->transient.edit_pos->scroll.scroll_y;
|
||||
|
||||
// NOTE(allen): For now we will temporarily adjust scroll_y to try
|
||||
// to prevent the view moving around until floating sections are added
|
||||
// to the gui system.
|
||||
scroll_y += view->transient.widget_height;
|
||||
|
||||
Full_Cursor render_cursor = {0};
|
||||
if (!file->settings.unwrapped_lines){
|
||||
render_cursor = file_compute_cursor(system, file, seek_wrapped_xy(0, scroll_y, 0), true);
|
||||
}
|
||||
else{
|
||||
render_cursor = file_compute_cursor(system, file, seek_unwrapped_xy(0, scroll_y, 0), true);
|
||||
}
|
||||
|
||||
view->transient.edit_pos->scroll_i = render_cursor.pos;
|
||||
|
||||
i32 item_count = 0;
|
||||
i32 end_pos = 0;
|
||||
{
|
||||
Buffer_Render_Params params;
|
||||
params.buffer = &file->state.buffer;
|
||||
params.items = items;
|
||||
params.max = max;
|
||||
params.count = &item_count;
|
||||
params.port_x = (f32)rect.x0 + left_side_space;
|
||||
params.port_y = (f32)rect.y0;
|
||||
params.clip_w = view_width(view) - left_side_space;
|
||||
params.scroll_x = scroll_x;
|
||||
params.scroll_y = scroll_y;
|
||||
params.width = max_x;
|
||||
params.height = (f32)max_y;
|
||||
params.start_cursor = render_cursor;
|
||||
params.wrapped = wrapped;
|
||||
params.system = system;
|
||||
params.font = font;
|
||||
params.virtual_white = file->settings.virtual_white;
|
||||
params.wrap_slashes = file->settings.wrap_indicator;
|
||||
|
||||
Buffer_Render_State state = {0};
|
||||
Buffer_Layout_Stop stop = {0};
|
||||
|
||||
f32 line_shift = 0.f;
|
||||
b32 do_wrap = 0;
|
||||
i32 wrap_unit_end = 0;
|
||||
|
||||
b32 first_wrap_determination = 1;
|
||||
i32 wrap_array_index = 0;
|
||||
|
||||
do{
|
||||
stop = buffer_render_data(&state, params, line_shift, do_wrap, wrap_unit_end);
|
||||
switch (stop.status){
|
||||
case BLStatus_NeedWrapDetermination:
|
||||
{
|
||||
if (first_wrap_determination){
|
||||
wrap_array_index = binary_search(file->state.wrap_positions, stop.pos, 0, file->state.wrap_position_count);
|
||||
++wrap_array_index;
|
||||
if (file->state.wrap_positions[wrap_array_index] == stop.pos){
|
||||
do_wrap = 1;
|
||||
wrap_unit_end = file->state.wrap_positions[wrap_array_index];
|
||||
}
|
||||
else{
|
||||
do_wrap = 0;
|
||||
wrap_unit_end = file->state.wrap_positions[wrap_array_index];
|
||||
}
|
||||
first_wrap_determination = 0;
|
||||
}
|
||||
else{
|
||||
Assert(stop.pos == wrap_unit_end);
|
||||
do_wrap = 1;
|
||||
++wrap_array_index;
|
||||
wrap_unit_end = file->state.wrap_positions[wrap_array_index];
|
||||
}
|
||||
}break;
|
||||
|
||||
case BLStatus_NeedWrapLineShift:
|
||||
case BLStatus_NeedLineShift:
|
||||
{
|
||||
line_shift = file->state.line_indents[stop.wrap_line_index];
|
||||
}break;
|
||||
}
|
||||
}while(stop.status != BLStatus_Finished);
|
||||
|
||||
end_pos = state.i;
|
||||
}
|
||||
push_array(part, Buffer_Render_Item, item_count);
|
||||
|
||||
Range on_screen_range = {0};
|
||||
on_screen_range.first = render_cursor.pos;
|
||||
on_screen_range.one_past_last = end_pos;
|
||||
|
||||
////
|
||||
|
||||
if (models->render_caller != 0){
|
||||
models->command_data.render_view = view;
|
||||
models->command_data.render_rect = rect;
|
||||
models->command_data.render_cursor = render_cursor;
|
||||
models->command_data.render_range = on_screen_range;
|
||||
models->command_data.render_items = items;
|
||||
models->command_data.render_item_count = item_count;
|
||||
models->render_caller(&models->app_links, view->persistent.id + 1, on_screen_range, do_core_render);
|
||||
}
|
||||
else{
|
||||
render_loaded_file_in_view__inner(models, target, view,
|
||||
rect, render_cursor, on_screen_range,
|
||||
items, item_count);
|
||||
}
|
||||
|
||||
end_temp_memory(temp);
|
||||
}
|
||||
|
|
12
4ed_view.h
12
4ed_view.h
|
@ -210,10 +210,18 @@ enum{
|
|||
|
||||
struct Render_Marker{
|
||||
Marker_Visuals_Type type;
|
||||
i32 pos;
|
||||
u32 color;
|
||||
u32 text_color;
|
||||
i32 range_id;
|
||||
i32 pos;
|
||||
i32 one_past_last;
|
||||
i32 priority;
|
||||
};
|
||||
|
||||
struct Render_Range_Record{
|
||||
u32 color;
|
||||
u32 text_color;
|
||||
i32 one_past_last;
|
||||
i32 priority;
|
||||
};
|
||||
|
||||
struct Render_Marker_Array{
|
||||
|
|
|
@ -224,18 +224,6 @@ draw_file_bar(System_Functions *system, Render_Target *target, View *view, Model
|
|||
}
|
||||
}
|
||||
|
||||
internal void
|
||||
do_core_render(Application_Links *app){
|
||||
Command_Data *cmd = (Command_Data*)app->cmd_context;
|
||||
System_Functions *system = cmd->system;
|
||||
Models *models = cmd->models;
|
||||
View *view = cmd->render_view;
|
||||
i32_Rect rect = cmd->render_rect;
|
||||
b32 is_active = cmd->render_is_active;
|
||||
Render_Target *target = cmd->target;
|
||||
render_loaded_file_in_view(system, view, models, rect, is_active, target);
|
||||
}
|
||||
|
||||
internal void
|
||||
do_render_file_view(System_Functions *system, View *view, Models *models, GUI_Scroll_Vars *scroll, View *active, i32_Rect rect, b32 is_active, Render_Target *target, Input_Summary *user_input){
|
||||
|
||||
|
@ -284,15 +272,7 @@ do_render_file_view(System_Functions *system, View *view, Models *models, GUI_Sc
|
|||
draw_push_clip(target, rect);
|
||||
if (!view->transient.ui_mode){
|
||||
if (file_is_ready(file)){
|
||||
if (models->render_caller != 0){
|
||||
models->command_data.render_view = view;
|
||||
models->command_data.render_rect = rect;
|
||||
models->command_data.render_is_active = is_active;
|
||||
models->render_caller(&models->app_links, view->persistent.id + 1, do_core_render);
|
||||
}
|
||||
else{
|
||||
render_loaded_file_in_view(system, view, models, rect, is_active, target);
|
||||
}
|
||||
render_loaded_file_in_view(system, view, models, rect, is_active, target);
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
|
|
@ -173,6 +173,14 @@ static char* main_style_fields[] = {
|
|||
"paste",
|
||||
"undo",
|
||||
"next_undo",
|
||||
"back_cycle_1",
|
||||
"back_cycle_2",
|
||||
"back_cycle_3",
|
||||
"back_cycle_4",
|
||||
"text_cycle_1",
|
||||
"text_cycle_2",
|
||||
"text_cycle_3",
|
||||
"text_cycle_4",
|
||||
};
|
||||
|
||||
internal char*
|
||||
|
@ -737,27 +745,43 @@ generate_remapping_code_and_data(){
|
|||
bind(mappings, key_mouse_left_release, MDFR_NONE, click_set_cursor);
|
||||
bind(mappings, key_mouse_move, MDFR_NONE, click_set_cursor_if_lbutton);
|
||||
|
||||
bind(mappings, key_left, MDFR_NONE, move_left);
|
||||
bind(mappings, key_right, MDFR_NONE, move_right);
|
||||
bind(mappings, key_del, MDFR_NONE, delete_char);
|
||||
bind(mappings, key_del, MDFR_SHIFT, delete_char);
|
||||
bind(mappings, key_back, MDFR_NONE, backspace_char);
|
||||
bind(mappings, key_back, MDFR_SHIFT, backspace_char);
|
||||
bind(mappings, key_up, MDFR_NONE, move_up);
|
||||
bind(mappings, key_down, MDFR_NONE, move_down);
|
||||
bind(mappings, key_del, MDFR_NONE, delete_char);
|
||||
bind(mappings, key_del, MDFR_SHIFT, delete_char);
|
||||
bind(mappings, key_back, MDFR_NONE, backspace_char);
|
||||
bind(mappings, key_back, MDFR_SHIFT, backspace_char);
|
||||
|
||||
bind(mappings, key_up, MDFR_NONE, move_up);
|
||||
bind(mappings, key_down, MDFR_NONE, move_down);
|
||||
bind(mappings, key_left, MDFR_NONE, move_left);
|
||||
bind(mappings, key_right, MDFR_NONE, move_right);
|
||||
bind(mappings, key_up, MDFR_SHIFT, move_up);
|
||||
bind(mappings, key_down, MDFR_SHIFT, move_down);
|
||||
bind(mappings, key_left, MDFR_SHIFT, move_left);
|
||||
bind(mappings, key_right, MDFR_SHIFT, move_right);
|
||||
|
||||
bind(mappings, key_end, MDFR_NONE, seek_end_of_line);
|
||||
bind(mappings, key_home, MDFR_NONE, seek_beginning_of_line);
|
||||
bind(mappings, key_page_up, MDFR_CTRL, goto_beginning_of_file);
|
||||
bind(mappings, key_page_down, MDFR_CTRL, goto_end_of_file);
|
||||
bind(mappings, key_page_up, MDFR_NONE, page_up);
|
||||
bind(mappings, key_page_down, MDFR_NONE, page_down);
|
||||
bind(mappings, key_end, MDFR_SHIFT, seek_end_of_line);
|
||||
bind(mappings, key_home, MDFR_SHIFT, seek_beginning_of_line);
|
||||
bind(mappings, key_page_up, MDFR_CTRL|MDFR_SHIFT, goto_beginning_of_file);
|
||||
bind(mappings, key_page_down, MDFR_CTRL|MDFR_SHIFT, goto_end_of_file);
|
||||
bind(mappings, key_page_up, MDFR_SHIFT, page_up);
|
||||
bind(mappings, key_page_down, MDFR_SHIFT, page_down);
|
||||
|
||||
bind(mappings, key_right, MDFR_CTRL, seek_whitespace_right);
|
||||
bind(mappings, key_left, MDFR_CTRL, seek_whitespace_left);
|
||||
bind(mappings, key_up, MDFR_CTRL, seek_whitespace_up_end_line);
|
||||
bind(mappings, key_down, MDFR_CTRL, seek_whitespace_down_end_line);
|
||||
bind(mappings, key_right, MDFR_CTRL, seek_whitespace_right);
|
||||
bind(mappings, key_left, MDFR_CTRL, seek_whitespace_left);
|
||||
bind(mappings, key_up, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_up_end_line);
|
||||
bind(mappings, key_down, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_down_end_line);
|
||||
bind(mappings, key_right, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_right);
|
||||
bind(mappings, key_left, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_left);
|
||||
|
||||
bind(mappings, key_up, MDFR_ALT, move_line_up);
|
||||
bind(mappings, key_up, MDFR_ALT, move_line_up);
|
||||
bind(mappings, key_down, MDFR_ALT, move_line_down);
|
||||
|
||||
bind(mappings, key_back, MDFR_CTRL, backspace_word);
|
||||
|
@ -941,27 +965,43 @@ generate_remapping_code_and_data(){
|
|||
bind(mappings, key_mouse_left_release, MDFR_NONE, click_set_cursor);
|
||||
bind(mappings, key_mouse_move, MDFR_NONE, click_set_cursor_if_lbutton);
|
||||
|
||||
bind(mappings, key_left, MDFR_NONE, move_left);
|
||||
bind(mappings, key_right, MDFR_NONE, move_right);
|
||||
bind(mappings, key_del, MDFR_NONE, delete_char);
|
||||
bind(mappings, key_del, MDFR_SHIFT, delete_char);
|
||||
bind(mappings, key_back, MDFR_NONE, backspace_char);
|
||||
bind(mappings, key_back, MDFR_SHIFT, backspace_char);
|
||||
bind(mappings, key_up, MDFR_NONE, move_up);
|
||||
bind(mappings, key_down, MDFR_NONE, move_down);
|
||||
bind(mappings, key_end, MDFR_NONE, seek_end_of_line);
|
||||
bind(mappings, key_home, MDFR_NONE, seek_beginning_of_line);
|
||||
|
||||
bind(mappings, key_up, MDFR_NONE, move_up);
|
||||
bind(mappings, key_down, MDFR_NONE, move_down);
|
||||
bind(mappings, key_left, MDFR_NONE, move_left);
|
||||
bind(mappings, key_right, MDFR_NONE, move_right);
|
||||
bind(mappings, key_up, MDFR_SHIFT, move_up);
|
||||
bind(mappings, key_down, MDFR_SHIFT, move_down);
|
||||
bind(mappings, key_left, MDFR_SHIFT, move_left);
|
||||
bind(mappings, key_right, MDFR_SHIFT, move_right);
|
||||
|
||||
bind(mappings, key_end, MDFR_NONE, seek_end_of_line);
|
||||
bind(mappings, key_home, MDFR_NONE, seek_beginning_of_line);
|
||||
bind(mappings, key_page_up, MDFR_CTRL, goto_beginning_of_file);
|
||||
bind(mappings, key_page_down, MDFR_CTRL, goto_end_of_file);
|
||||
bind(mappings, key_page_up, MDFR_NONE, page_up);
|
||||
bind(mappings, key_page_up, MDFR_NONE, page_up);
|
||||
bind(mappings, key_page_down, MDFR_NONE, page_down);
|
||||
bind(mappings, key_end, MDFR_SHIFT, seek_end_of_line);
|
||||
bind(mappings, key_home, MDFR_SHIFT, seek_beginning_of_line);
|
||||
bind(mappings, key_page_up, MDFR_CTRL|MDFR_SHIFT, goto_beginning_of_file);
|
||||
bind(mappings, key_page_down, MDFR_CTRL|MDFR_SHIFT, goto_end_of_file);
|
||||
bind(mappings, key_page_up, MDFR_SHIFT, page_up);
|
||||
bind(mappings, key_page_down, MDFR_SHIFT, page_down);
|
||||
|
||||
bind(mappings, key_up, MDFR_CMND, seek_whitespace_up_end_line);
|
||||
bind(mappings, key_down, MDFR_CMND, seek_whitespace_down_end_line);
|
||||
bind(mappings, key_right, MDFR_CMND, seek_whitespace_right);
|
||||
bind(mappings, key_left, MDFR_CMND, seek_whitespace_left);
|
||||
bind(mappings, key_up, MDFR_CMND, seek_whitespace_up_end_line);
|
||||
bind(mappings, key_down, MDFR_CMND, seek_whitespace_down_end_line);
|
||||
bind(mappings, key_left, MDFR_CMND, seek_whitespace_left);
|
||||
bind(mappings, key_up, MDFR_CMND|MDFR_SHIFT, seek_whitespace_up_end_line);
|
||||
bind(mappings, key_down, MDFR_CMND|MDFR_SHIFT, seek_whitespace_down_end_line);
|
||||
bind(mappings, key_right, MDFR_CMND|MDFR_SHIFT, seek_whitespace_right);
|
||||
bind(mappings, key_left, MDFR_CMND|MDFR_SHIFT, seek_whitespace_left);
|
||||
|
||||
bind(mappings, key_up, MDFR_ALT, move_line_up);
|
||||
bind(mappings, key_up, MDFR_ALT, move_line_up);
|
||||
bind(mappings, key_down, MDFR_ALT, move_line_down);
|
||||
|
||||
bind(mappings, key_back, MDFR_CMND, backspace_word);
|
||||
|
@ -1108,27 +1148,32 @@ generate_remapping_code_and_data(){
|
|||
append(&m, "|");
|
||||
}
|
||||
append(&m, "MDFR_CTRL");
|
||||
has_base = true;
|
||||
}
|
||||
if (bind->modifiers & MDFR_ALT){
|
||||
if (has_base){
|
||||
append(&m, "|");
|
||||
}
|
||||
append(&m, "MDFR_ALT");
|
||||
has_base = true;
|
||||
}
|
||||
if (bind->modifiers & MDFR_CMND){
|
||||
if (has_base){
|
||||
append(&m, "|");
|
||||
}
|
||||
append(&m, "MDFR_CMND");
|
||||
has_base = true;
|
||||
}
|
||||
if (bind->modifiers & MDFR_SHIFT){
|
||||
if (has_base){
|
||||
append(&m, "|");
|
||||
}
|
||||
append(&m, "MDFR_SHIFT");
|
||||
has_base = true;
|
||||
}
|
||||
if (bind->modifiers == 0){
|
||||
append(&m, "MDFR_NONE");
|
||||
has_base = true;
|
||||
}
|
||||
terminate_with_null(&m);
|
||||
|
||||
|
|
|
@ -6,9 +6,18 @@
|
|||
// <my-own-string> - If you use the custom layer to make a named mapping you can use that here too.
|
||||
mapping = "";
|
||||
|
||||
// MODE
|
||||
// "4coder" - The default 4coder mode that has been around since the beginning of time (2015)
|
||||
// "notepad-like" - Single "thin" cursor and highlight ranges like in notepad, sublime, notepad++, etc
|
||||
mode = "notepad-like";
|
||||
|
||||
// UI
|
||||
use_scroll_bars = false;
|
||||
use_file_bars = true;
|
||||
use_line_highlight = true;
|
||||
use_scope_highlight = true;
|
||||
use_paren_helper = true;
|
||||
use_comment_keywords = true;
|
||||
|
||||
// Code Wrapping
|
||||
treat_as_code = ".cpp.c.hpp.h.cc.cs.java.rs.glsl.m";
|
||||
|
|
|
@ -38,3 +38,12 @@ Bar_Active = 0xFF666666;
|
|||
Base = 0xFF000000;
|
||||
Pop1 = 0xFF3C57DC;
|
||||
Pop2 = 0xFFFF0000;
|
||||
|
||||
Back_Cycle_1 = 0x10A00000;
|
||||
Back_Cycle_2 = 0x0C00A000;
|
||||
Back_Cycle_3 = 0x0C0000A0;
|
||||
Back_Cycle_4 = 0x0CA0A000;
|
||||
Text_Cycle_1 = 0xFFA00000;
|
||||
Text_Cycle_2 = 0xFF00A000;
|
||||
Text_Cycle_3 = 0xFF0030B0;
|
||||
Text_Cycle_4 = 0xFFA0A000;
|
||||
|
|
|
@ -9,7 +9,7 @@ List_Item_Hover = Margin_Hover;
|
|||
List_Item_Active = Margin_Active;
|
||||
Cursor = 0xFF40FF40;
|
||||
At_Cursor = Back;
|
||||
Highlight_Cursor_Line = 0xFF003A3A;
|
||||
Highlight_Cursor_Line = 0xFF121E12;
|
||||
Highlight = 0xFF703419;
|
||||
Mark = 0xFF808080;
|
||||
Default = 0xFFA08563;
|
||||
|
@ -38,3 +38,16 @@ Bar_Active = FFA8A8A8;
|
|||
Base = 0xFF000000;
|
||||
Pop1 = 0xFF03CF0C;
|
||||
Pop2 = 0xFFFF0000;
|
||||
|
||||
Back_Cycle_1 = 0x0CA00000;
|
||||
Back_Cycle_2 = 0x0800A000;
|
||||
Back_Cycle_3 = 0x080000A0;
|
||||
Back_Cycle_4 = 0x08A0A000;
|
||||
Text_Cycle_1 = 0xFFA00000;
|
||||
Text_Cycle_2 = 0xFF00A000;
|
||||
Text_Cycle_3 = 0xFF0020B0;
|
||||
Text_Cycle_4 = 0xFFA0A000;
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -38,3 +38,12 @@ Base = 0xFFFFFFFF;
|
|||
Pop1 = 0xFF007E00;
|
||||
Pop2 = 0xFFE80505;
|
||||
|
||||
Back_Cycle_1 = 0x1CA00000;
|
||||
Back_Cycle_2 = 0x1C00A000;
|
||||
Back_Cycle_3 = 0x1C0000A0;
|
||||
Back_Cycle_4 = 0x1CA0A000;
|
||||
Text_Cycle_1 = 0xFFF01010;
|
||||
Text_Cycle_2 = 0xFF20D020;
|
||||
Text_Cycle_3 = 0xFF0000F0;
|
||||
Text_Cycle_4 = 0xFFD0D000;
|
||||
|
||||
|
|
|
@ -37,3 +37,12 @@ Bar_Active = 0xFF3E3E3E;
|
|||
Base = 0xFF000000;
|
||||
Pop1 = 0xFF00B0D0;
|
||||
Pop2 = 0xFFFF3A00;
|
||||
|
||||
Back_Cycle_1 = 0x08A00000;
|
||||
Back_Cycle_2 = 0x0800A000;
|
||||
Back_Cycle_3 = 0x080000A0;
|
||||
Back_Cycle_4 = 0x08A0A000;
|
||||
Text_Cycle_1 = 0xFFF01010;
|
||||
Text_Cycle_2 = 0xFF20D020;
|
||||
Text_Cycle_3 = 0xFF0080E0;
|
||||
Text_Cycle_4 = 0xFFD0D000;
|
||||
|
|
|
@ -37,3 +37,12 @@ Bar_Active = 0xFF3E3E3E;
|
|||
Base = 0xFF000000;
|
||||
Pop1 = 0xFF00B0D0;
|
||||
Pop2 = 0xFFFF3A00;
|
||||
|
||||
Back_Cycle_1 = 0x06A00000;
|
||||
Back_Cycle_2 = 0x0600A000;
|
||||
Back_Cycle_3 = 0x060000A0;
|
||||
Back_Cycle_4 = 0x06A0A000;
|
||||
Text_Cycle_1 = 0xFFAA0A0A;
|
||||
Text_Cycle_2 = 0xFF149014;
|
||||
Text_Cycle_3 = 0xFF0060A8;
|
||||
Text_Cycle_4 = 0xFF909000;
|
||||
|
|
|
@ -37,3 +37,13 @@ Bar_Active = 0xFF3E3E3E;
|
|||
Base = 0xFF000000;
|
||||
Pop1 = 0xFF1111DC;
|
||||
Pop2 = 0xFFE80505;
|
||||
|
||||
Back_Cycle_1 = 0x10A00000;
|
||||
Back_Cycle_2 = 0x1000A000;
|
||||
Back_Cycle_3 = 0x100000A0;
|
||||
Back_Cycle_4 = 0x10A0A000;
|
||||
Text_Cycle_1 = 0xFFA00000;
|
||||
Text_Cycle_2 = 0xFF00A000;
|
||||
Text_Cycle_3 = 0xFF0000A0;
|
||||
Text_Cycle_4 = 0xFFA0A000;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ List_Item_Hover = Margin_Hover;
|
|||
List_Item_Active = Margin_Active;
|
||||
Cursor = 0xFFd96e26;
|
||||
At_Cursor = Back;
|
||||
Highlight_Cursor_Line = 0xFF003A3A;
|
||||
Highlight_Cursor_Line = 0xFF002222;
|
||||
Mark = 0xFF808080;
|
||||
Highlight = 0xFF703419;
|
||||
At_Highlight = 0xFFCDAA7D;
|
||||
|
@ -38,3 +38,12 @@ Base = 0xFF000000;
|
|||
Pop1 = 0xFF03CF0C;
|
||||
Pop2 = 0xFFFF0000;
|
||||
|
||||
Back_Cycle_1 = 0x0CA00000;
|
||||
Back_Cycle_2 = 0x0C00A000;
|
||||
Back_Cycle_3 = 0x0C0000A0;
|
||||
Back_Cycle_4 = 0x0CA0A000;
|
||||
Text_Cycle_1 = 0xFFF00000;
|
||||
Text_Cycle_2 = 0xFF00F000;
|
||||
Text_Cycle_3 = 0xFF0080F0;
|
||||
Text_Cycle_4 = 0xFFF0F000;
|
||||
|
||||
|
|
|
@ -37,3 +37,12 @@ Bar_Active = 0xFFC1C1C1;
|
|||
Base = 0xFFFFFFFF;
|
||||
Pop1 = 0xFFFF4F2F;
|
||||
Pop2 = 0xFF00C5FF;
|
||||
|
||||
Back_Cycle_1 = 0x14A00000;
|
||||
Back_Cycle_2 = 0x1400A000;
|
||||
Back_Cycle_3 = 0x140000A0;
|
||||
Back_Cycle_4 = 0x14A0A000;
|
||||
Text_Cycle_1 = 0xFFF00000;
|
||||
Text_Cycle_2 = 0xFF00C030;
|
||||
Text_Cycle_3 = 0xFF0000F0;
|
||||
Text_Cycle_4 = 0xFFF0F000;
|
||||
|
|
|
@ -37,3 +37,12 @@ Bar_Active = 0xFF0F3C46;
|
|||
Base = 0xFF000000;
|
||||
Pop1 = 0xFF1BFF0C;
|
||||
Pop2 = 0xFFFF200D;
|
||||
|
||||
Back_Cycle_1 = 0x0EA00000;
|
||||
Back_Cycle_2 = 0x0D00A000;
|
||||
Back_Cycle_3 = 0x0D0000A0;
|
||||
Back_Cycle_4 = 0x0EA0A000;
|
||||
Text_Cycle_1 = 0xFFF00000;
|
||||
Text_Cycle_2 = 0xFF00C030;
|
||||
Text_Cycle_3 = 0xFF0040F0;
|
||||
Text_Cycle_4 = 0xFFB0B000;
|
||||
|
|
75
todo.txt
75
todo.txt
|
@ -3,40 +3,11 @@
|
|||
{
|
||||
Features
|
||||
{
|
||||
[] Finalize visualizations API
|
||||
{
|
||||
[x] Add and remove visualizations, allow more than one on a single markers object
|
||||
[x] Iterate visualizations
|
||||
[] Take rule
|
||||
[] Priority
|
||||
[x] View key
|
||||
[] Check it all
|
||||
}
|
||||
[] Better range handling (range contained inside range)
|
||||
[] Range of line highlights
|
||||
[] When clearing all dependent scopes, don't delete them, just clear them
|
||||
[] New Features with Visible Markers
|
||||
{
|
||||
[x] Customizable Highlight Line at Cursor All the Time
|
||||
[x] Customizable Highlight Token at Cursor All the Time
|
||||
[] Paren/Brace Matching (with color pallette expansion)
|
||||
{
|
||||
[x] Get ranges to mark and mark them
|
||||
[] Works on parentheses
|
||||
[] Colors pulled from color pallette
|
||||
[] Optional modes: Off, Mark Delimters, Cover Ranges
|
||||
}
|
||||
}
|
||||
[] Color Pallette Expansion For Keywords
|
||||
[] Performance of lots of highlighted rectangles on screen is pooooooooor, fix it.
|
||||
[] Reload all out of sync files
|
||||
[] Jump to Command Definition (useful for 4coder customization developers only)
|
||||
[] I-Bar and Highlight Mode
|
||||
{
|
||||
[] Cursor navigation commands
|
||||
[] Insert character
|
||||
[] Paste
|
||||
[] Backspace and delete
|
||||
}
|
||||
[] Cleanup names in Marker_Visuals API
|
||||
[] Declarative system for keyword direct coloring
|
||||
}
|
||||
|
||||
Bugs
|
||||
|
@ -104,6 +75,46 @@ Change Log
|
|||
[x] Wire Cursor Block
|
||||
[x] Highlight Range
|
||||
}
|
||||
|
||||
[x] Finalize visualizations API
|
||||
{
|
||||
[x] Add and remove visualizations, allow more than one on a single markers object
|
||||
[x] Iterate visualizations
|
||||
[x] Take rule
|
||||
[x] Priority
|
||||
[x] View key
|
||||
}
|
||||
[x] Better range handling (range contained inside range)
|
||||
[x] Range of line highlights
|
||||
[x] text color in marker highlights
|
||||
[x] symbolic colors
|
||||
[x] When clearing all dependent scopes, don't delete them, just clear them
|
||||
|
||||
[x] I-Bar and Highlight Mode
|
||||
{
|
||||
[x] Cursor navigation commands
|
||||
[x] Insert character
|
||||
[x] Paste
|
||||
[x] Backspace and delete
|
||||
[x] config options
|
||||
[x] toggle commands
|
||||
}
|
||||
[x] Highlight target in Query Replace
|
||||
[x] Color Pallette Expansion For Keywords
|
||||
[x] TODO Bright red
|
||||
[x] NOTE Bright green
|
||||
[x] New Features with Visible Markers
|
||||
{
|
||||
[x] Customizable Highlight Line at Cursor All the Time
|
||||
[x] Customizable Highlight Token at Cursor All the Time
|
||||
[] Paren/Brace Matching (with color pallette expansion)
|
||||
{
|
||||
[x] Get ranges to mark and mark them
|
||||
[x] Works on parentheses
|
||||
[x] Optional modes: Off, Mark Delimters, Cover Ranges
|
||||
[x] Colors pulled from color pallette
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue