diff options
| author | Gabriel Schneider <[email protected]> | 2026-07-03 17:33:05 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-01 15:02:07 -0300 |
| commit | f3b62fe53b19e36f21f8020831718cbf095d6a7b (patch) | |
| tree | cdfd008869bb5f5aeb69f0ef30584fec86f6f95b /term.zig | |
| parent | 6b4b1f76bb6bf969fb5106f95fb3f9ad077fac08 (diff) | |
| download | pardes-f3b62fe53b19e36f21f8020831718cbf095d6a7b.tar.gz pardes-f3b62fe53b19e36f21f8020831718cbf095d6a7b.zip | |
performance pass
Diffstat (limited to 'term.zig')
| -rw-r--r-- | term.zig | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -49,8 +49,13 @@ pub const File = struct { content: []u8, // gpa-owned file bytes scroll: usize = 0, // top visible file line /// tree-sitter syntax styles, one byte per `content` byte (0 = none). Empty - /// when the file's language isn't highlighted. gpa-owned. See main.highlightFile. + /// when the file's language isn't highlighted. gpa-owned. `highlight_start` + /// is the content byte offset represented by `highlights[0]`. highlights: []u8 = &.{}, + highlight_start: usize = 0, + /// The content or viewport changed since `highlights` was refreshed for the + /// visible byte window. + syntax_dirty: bool = false, /// dumb whole-content undo/redo: each entry is a gpa-owned snapshot of /// `content`. main.pushUndo snapshots before an edit (one per insert session / /// delete / paste); `u`/`U` move between them. Bounded (oldest dropped). |
