diff options
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). |
