feat: support loading extreamly large files
- Allocate initial file and leaf data outside of Buffer.arena - Disable gutter diffs for very large files - Disable syntax highlighting for very large files
This commit is contained in:
parent
7332108820
commit
b09aa98f70
4 changed files with 32 additions and 11 deletions
|
@ -300,6 +300,10 @@ fn mouse_click_button5(_: *Self) error{Exit}!bool {
|
|||
}
|
||||
|
||||
fn diff_update(self: *Self) !void {
|
||||
if (self.lines > root.max_diff_lines) {
|
||||
self.diff_symbols_clear();
|
||||
return;
|
||||
}
|
||||
const editor = self.editor;
|
||||
const new = if (editor.get_current_root()) |new| new else return;
|
||||
const old = if (editor.buffer) |buffer| if (buffer.last_save) |old| old else return else return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue