summary refs log tree commit diff
path: root/src/main.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main.zig b/src/main.zig
index c2d9d12..f34d878 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -49,7 +49,7 @@ const Environment = struct {
     allocator: Allocator,
     loop: *Loop(Event),
     parser: *Parser,
-    span: *selection.Span,
+    segment: *selection.Segment,
     text: []const u8,
     tty: *Tty,
     vaxis: *Vaxis,
@@ -76,7 +76,7 @@ const Environment = struct {
         var graphemes = self.vaxis.unicode.graphemeIterator(self.text);
         while (graphemes.next()) |grapheme| {
             const style = Style {
-                .reverse = self.span.contains(grapheme),
+                .reverse = self.segment.contains(grapheme),
             };
             const bytes = grapheme.bytes(self.text);
             if (eql(u8, bytes, "\n")) {
@@ -111,19 +111,19 @@ const Environment = struct {
     }
 
     pub fn goUp(self: Environment) void {
-        self.span.goUp();
+        self.segment.goUp();
     }
 
     pub fn goRight(self: Environment) void {
-        self.span.goRight(self.vaxis.unicode.width_data.graphemes, self.text);
+        self.segment.goRight(self.vaxis.unicode.width_data.graphemes, self.text);
     }
 
     pub fn goLeft(self: Environment) void {
-        self.span.goLeft(self.vaxis.unicode.width_data.graphemes, self.text);
+        self.segment.goLeft(self.vaxis.unicode.width_data.graphemes, self.text);
     }
 
     pub fn goDown(self: Environment) void {
-        self.span.goDown(self.vaxis.unicode.width_data.graphemes, self.text);
+        self.segment.goDown(self.vaxis.unicode.width_data.graphemes, self.text);
     }
 };
 
@@ -163,7 +163,7 @@ pub fn main() !void {
 
     zsanett.init();
     defer zsanett.deinit();
-    var span = selection.Span{
+    var segment = selection.Segment{
         .head = .{ .node = tree.rootNode() },
         .tail = .{ .node = tree.rootNode() },
     };
@@ -171,7 +171,7 @@ pub fn main() !void {
         .allocator = allocator,
         .loop = &loop,
         .parser = parser,
-        .span = &span,
+        .segment = &segment,
         .text = text,
         .tty = &tty,
         .vaxis = &vx,