Merge branch 'master' of https://github.com/SuperAuguste/zls into separate_text_mem

This commit is contained in:
Alexandros Naskos 2020-05-07 19:54:11 +03:00
commit 6ac068a3c5

View File

@ -140,8 +140,7 @@ pub const TextDocument = struct {
text: String, text: String,
// This holds the memory that we have actually allocated. // This holds the memory that we have actually allocated.
mem: []u8, mem: []u8,
sane_text: ?String = "", sane_text: ?String = null,
// tree: ?*std.zig.ast.Tree = null,
pub fn positionToIndex(self: *const TextDocument, position: Position) !usize { pub fn positionToIndex(self: *const TextDocument, position: Position) !usize {
var split_iterator = std.mem.split(self.text, "\n"); var split_iterator = std.mem.split(self.text, "\n");