Last minute hms fixes (#1)

master
Allen Webster 2019-11-15 15:33:14 -08:00
parent 688b4e2083
commit ef6d66a516
3 changed files with 20 additions and 17 deletions

View File

@ -91,8 +91,10 @@ CUSTOM_DOC("Puts the buffer in crlf line ending mode.")
Managed_Scope scope = buffer_get_managed_scope(app, buffer);
Line_Ending_Kind *eol_setting = scope_attachment(app, scope, buffer_eol_setting,
Line_Ending_Kind);
if (eol_setting != 0){
*eol_setting = LineEndingKind_CRLF;
}
}
CUSTOM_COMMAND_SIG(set_eol_mode_to_lf)
CUSTOM_DOC("Puts the buffer in lf line ending mode.")
@ -102,8 +104,10 @@ CUSTOM_DOC("Puts the buffer in lf line ending mode.")
Managed_Scope scope = buffer_get_managed_scope(app, buffer);
Line_Ending_Kind *eol_setting = scope_attachment(app, scope, buffer_eol_setting,
Line_Ending_Kind);
if (eol_setting != 0){
*eol_setting = LineEndingKind_LF;
}
}
CUSTOM_COMMAND_SIG(set_eol_mode_to_binary)
CUSTOM_DOC("Puts the buffer in bin line ending mode.")
@ -113,8 +117,10 @@ CUSTOM_DOC("Puts the buffer in bin line ending mode.")
Managed_Scope scope = buffer_get_managed_scope(app, buffer);
Line_Ending_Kind *eol_setting = scope_attachment(app, scope, buffer_eol_setting,
Line_Ending_Kind);
if (eol_setting != 0){
*eol_setting = LineEndingKind_Binary;
}
}
CUSTOM_COMMAND_SIG(set_eol_mode_from_contents)
CUSTOM_DOC("Sets the buffer's line ending mode to match the contents of the buffer.")
@ -125,8 +131,10 @@ CUSTOM_DOC("Sets the buffer's line ending mode to match the contents of the buff
Managed_Scope scope = buffer_get_managed_scope(app, buffer);
Line_Ending_Kind *eol_setting = scope_attachment(app, scope, buffer_eol_setting,
Line_Ending_Kind);
if (eol_setting != 0){
*eol_setting = setting;
}
}
// BOTTOM

View File

@ -217,6 +217,8 @@ tutorial_run_loop(Application_Links *app){
tutorial.view = view;
tutorial_maximize(app);
change_active_panel(app);
for (;;){
User_Input in = get_next_input(app, EventPropertyGroup_Any, 0);
if (in.abort){
@ -229,16 +231,7 @@ tutorial_run_loop(Application_Links *app){
{
tutorial_maximize(app);
if (in.event.mouse.code == MouseCode_Left){
tutorial.depressed_action = tutorial.hover_action;
}
}break;
case InputEventKind_MouseButtonRelease:
{
if (in.event.mouse.code == MouseCode_Left){
if (tutorial.depressed_action == tutorial.hover_action){
tutorial_action(app, tutorial.depressed_action);
}
tutorial_action(app, tutorial.hover_action);
}
}break;
@ -248,6 +241,8 @@ tutorial_run_loop(Application_Links *app){
case CoreCode_ClickActivateView:
{
tutorial_maximize(app);
tutorial_action(app, tutorial.hover_action);
change_active_panel(app);
}break;
default:
@ -437,7 +432,7 @@ hms_demo_tutorial_slide_2(Application_Links *app, Arena *arena){
push_fancy_line(arena, long_details, face, fcolor_id(Stag_Pop1), string_u8_litexpr("Range commands based on a cursor and mark (emacs style):"));
hms_demo_tutorial_binding_line(app, arena, long_details, face,
"Control", "Space", "moves the mark to the cursor cursor");
"Control", "Space", "moves the mark to the cursor");
hms_demo_tutorial_binding_line(app, arena, long_details, face,
"Control", "D", "delete the range");

View File

@ -362,9 +362,9 @@ static Command_Metadata fcoder_metacmd_table[219] = {
{ PROC_LINKS(open_in_other, 0), false, "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 2010 },
{ PROC_LINKS(default_file_externally_modified, 0), false, "default_file_externally_modified", 32, "Notes the external modification of attached files by printing a message.", 72, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 2016 },
{ PROC_LINKS(set_eol_mode_to_crlf, 0), false, "set_eol_mode_to_crlf", 20, "Puts the buffer in crlf line ending mode.", 41, "w:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 86 },
{ PROC_LINKS(set_eol_mode_to_lf, 0), false, "set_eol_mode_to_lf", 18, "Puts the buffer in lf line ending mode.", 39, "w:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 97 },
{ PROC_LINKS(set_eol_mode_to_binary, 0), false, "set_eol_mode_to_binary", 22, "Puts the buffer in bin line ending mode.", 40, "w:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 108 },
{ PROC_LINKS(set_eol_mode_from_contents, 0), false, "set_eol_mode_from_contents", 26, "Sets the buffer's line ending mode to match the contents of the buffer.", 71, "w:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 119 },
{ PROC_LINKS(set_eol_mode_to_lf, 0), false, "set_eol_mode_to_lf", 18, "Puts the buffer in lf line ending mode.", 39, "w:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 99 },
{ PROC_LINKS(set_eol_mode_to_binary, 0), false, "set_eol_mode_to_binary", 22, "Puts the buffer in bin line ending mode.", 40, "w:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 112 },
{ PROC_LINKS(set_eol_mode_from_contents, 0), false, "set_eol_mode_from_contents", 26, "Sets the buffer's line ending mode to match the contents of the buffer.", 71, "w:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 125 },
{ PROC_LINKS(interactive_switch_buffer, 0), true, "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 416 },
{ PROC_LINKS(interactive_kill_buffer, 0), true, "interactive_kill_buffer", 23, "Interactively kill an open buffer.", 34, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 426 },
{ PROC_LINKS(interactive_open_or_new, 0), true, "interactive_open_or_new", 23, "Interactively open a file out of the file system.", 49, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 474 },
@ -457,7 +457,7 @@ static Command_Metadata fcoder_metacmd_table[219] = {
{ PROC_LINKS(kill_tutorial, 0), false, "kill_tutorial", 13, "If there is an active tutorial, kill it.", 40, "w:\\4ed\\code\\custom\\4coder_tutorial.cpp", 38, 9 },
{ PROC_LINKS(tutorial_maximize, 0), false, "tutorial_maximize", 17, "Expand the tutorial window", 26, "w:\\4ed\\code\\custom\\4coder_tutorial.cpp", 38, 20 },
{ PROC_LINKS(tutorial_minimize, 0), false, "tutorial_minimize", 17, "Shrink the tutorial window", 26, "w:\\4ed\\code\\custom\\4coder_tutorial.cpp", 38, 34 },
{ PROC_LINKS(hms_demo_tutorial, 0), false, "hms_demo_tutorial", 17, "Tutorial for built in 4coder bindings and features.", 51, "w:\\4ed\\code\\custom\\4coder_tutorial.cpp", 38, 874 },
{ PROC_LINKS(hms_demo_tutorial, 0), false, "hms_demo_tutorial", 17, "Tutorial for built in 4coder bindings and features.", 51, "w:\\4ed\\code\\custom\\4coder_tutorial.cpp", 38, 869 },
{ PROC_LINKS(default_startup, 0), false, "default_startup", 15, "Default command for responding to a startup event", 49, "w:\\4ed\\code\\custom\\4coder_default_hooks.cpp", 43, 7 },
{ PROC_LINKS(default_try_exit, 0), false, "default_try_exit", 16, "Default command for responding to a try-exit event", 50, "w:\\4ed\\code\\custom\\4coder_default_hooks.cpp", 43, 22 },
};