summaryrefslogtreecommitdiff
path: root/src/Buffer.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Buffer.zig')
-rw-r--r--src/Buffer.zig17
1 files changed, 8 insertions, 9 deletions
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 @@
1const conf = @import("es-config"); 1const es = @import("root");
2const std = @import("std"); 2const std = @import("std");
3 3
4const Allocator = std.mem.Allocator; 4const Allocator = std.mem.Allocator;
5const ArrayList = std.ArrayList; 5const ArrayList = std.ArrayList;
6const Buffer = @This(); 6const Buffer = @This();
7const Config = @import("Config.zig"); 7const Config = es.Config;
8const File = std.fs.File; 8const File = std.fs.File;
9const files = @import("files.zig"); 9const Editor = es.Editor;
10const Editor = @import("Editor.zig"); 10const Highlight = es.Highlight;
11const Highlight = @import("highlight.zig").Highlight; 11const Row = es.Row;
12const Row = @import("Row.zig"); 12const Syntax = es.Syntax;
13const Syntax = @import("Syntax.zig");
14 13
15allocator: Allocator, 14allocator: Allocator,
16 15
@@ -200,7 +199,7 @@ pub fn drawRows(self: Buffer, writer: anytype, screenrows: usize, screencols: us
200 const welcome_data = try std.fmt.allocPrint( 199 const welcome_data = try std.fmt.allocPrint(
201 self.allocator, 200 self.allocator,
202 "ES -- version {}", 201 "ES -- version {}",
203 .{conf.es_version}, 202 .{es.conf.es_version},
204 ); 203 );
205 defer self.allocator.free(welcome_data); 204 defer self.allocator.free(welcome_data);
206 var welcome = welcome_data; 205 var welcome = welcome_data;
@@ -435,7 +434,7 @@ pub fn save(self: *Buffer, editor: *Editor) !void {
435 const fname = (try editor.prompt("Save as")) orelse { return; }; 434 const fname = (try editor.prompt("Save as")) orelse { return; };
436 defer self.allocator.free(fname); 435 defer self.allocator.free(fname);
437 436
438 const file_path = try files.resolvePath(self.allocator, fname); 437 const file_path = try es.files.resolvePath(self.allocator, fname);
439 errdefer self.allocator.free(file_path); 438 errdefer self.allocator.free(file_path);
440 439
441 const file_name = std.fs.path.basename(file_path); 440 const file_name = std.fs.path.basename(file_path);