summaryrefslogtreecommitdiff
path: root/ted.h
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-01 20:05:18 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-01 20:05:18 -0500
commitb042a8599c47b2fd41c7eb0d22ec417ca629a986 (patch)
tree870ffbbfe86ada39733d8f31971379caa0e1ab4a /ted.h
parentbb9c6b6ff3ca196977f9ddd73120897c679e2515 (diff)
small change to horizontal scrolling for massive performance improvement on large files
also fixed syntax highlighting for hex literals, for real this time
Diffstat (limited to 'ted.h')
-rw-r--r--ted.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ted.h b/ted.h
index df41766..4ab1fea 100644
--- a/ted.h
+++ b/ted.h
@@ -118,6 +118,8 @@ typedef struct {
u32 nlines;
u32 lines_capacity;
+ u32 longest_line_on_screen; // length of the longest line on screen. used to determine how far right we can scroll.
+
// to cache syntax highlighting properly, it is important to keep track of the
// first and last line modified since last frame.
u32 frame_earliest_line_modified;