Cleaning up line endings on save

This commit is contained in:
Peter Slattery 2024-04-27 13:43:54 -07:00
parent 120c6ceaad
commit 2142ef2ce9
3 changed files with 4 additions and 2 deletions

View File

@ -919,6 +919,8 @@ BUFFER_HOOK_SIG(default_file_save){
Managed_Scope scope = buffer_get_managed_scope(app, buffer_id); Managed_Scope scope = buffer_get_managed_scope(app, buffer_id);
Line_Ending_Kind *eol = scope_attachment(app, scope, buffer_eol_setting, Line_Ending_Kind *eol = scope_attachment(app, scope, buffer_eol_setting,
Line_Ending_Kind); Line_Ending_Kind);
clean_all_lines_buffer(app, buffer_id, CleanAllLinesMode_RemoveBlankLines);
switch (*eol){ switch (*eol){
case LineEndingKind_LF: case LineEndingKind_LF:
{ {

View File

@ -40,7 +40,7 @@ mark_thickness = 2;
lister_roundness = 20; lister_roundness = 20;
// Code Wrapping // Code Wrapping
treat_as_code = ".cpp.c.hpp.h.cc.cs.java.rs.glsl.m.mm.js.ts.tsx.css.html.jai.json.mm"; treat_as_code = ".cpp.c.hpp.h.cc.cs.java.rs.glsl.m.mm.js.ts.tsx.css.html.jai.json.mm.metal.glsl.hlsl";
enable_virtual_whitespace = false; enable_virtual_whitespace = false;
virtual_whitespace_regular_indent = 2; virtual_whitespace_regular_indent = 2;
enable_code_wrapping = false; enable_code_wrapping = false;

View File

@ -25,7 +25,7 @@ commands = {
.build = { .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .build = { .out = "*compilation*", .footer_panel = true, .save_dirty_files = true,
.win = "code\\bin\\build.bat", .win = "code\\bin\\build.bat",
.linux = "./code/bin/package.sh", .linux = "./code/bin/package.sh",
.mac = "./code/bin/package.sh", }, .mac = "./code/bin/package-mac.sh", },
.run = { .out = "*run*", .footer_panel = false, .save_dirty_files = false, .run = { .out = "*run*", .footer_panel = false, .save_dirty_files = false,
.win = "build\\4ed.exe", .win = "build\\4ed.exe",
.linux = "build/4ed", .linux = "build/4ed",