From bd3101517b7b2d0d81f2014eb3c2613e82b25def Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Sun, 2 Jan 2022 00:17:47 +0200 Subject: hierarchy changes --- src/Buffer.zig | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/Buffer.zig') diff --git a/src/Buffer.zig b/src/Buffer.zig index 0c95e6e..7f6e7d7 100644 --- a/src/Buffer.zig +++ b/src/Buffer.zig @@ -1,16 +1,15 @@ -const conf = @import("es-config"); +const es = @import("root"); const std = @import("std"); const Allocator = std.mem.Allocator; const ArrayList = std.ArrayList; const Buffer = @This(); -const Config = @import("Config.zig"); +const Config = es.Config; const File = std.fs.File; -const files = @import("files.zig"); -const Editor = @import("Editor.zig"); -const Highlight = @import("highlight.zig").Highlight; -const Row = @import("Row.zig"); -const Syntax = @import("Syntax.zig"); +const Editor = es.Editor; +const Highlight = es.Highlight; +const Row = es.Row; +const Syntax = es.Syntax; allocator: Allocator, @@ -200,7 +199,7 @@ pub fn drawRows(self: Buffer, writer: anytype, screenrows: usize, screencols: us const welcome_data = try std.fmt.allocPrint( self.allocator, "ES -- version {}", - .{conf.es_version}, + .{es.conf.es_version}, ); defer self.allocator.free(welcome_data); var welcome = welcome_data; @@ -435,7 +434,7 @@ pub fn save(self: *Buffer, editor: *Editor) !void { const fname = (try editor.prompt("Save as")) orelse { return; }; defer self.allocator.free(fname); - const file_path = try files.resolvePath(self.allocator, fname); + const file_path = try es.files.resolvePath(self.allocator, fname); errdefer self.allocator.free(file_path); const file_name = std.fs.path.basename(file_path); -- cgit v1.2.3