From fa7d94f3dfeed1cb8d0292d14b759b8649faa755 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Fri, 3 May 2024 13:58:23 -0500 Subject: [PATCH] window(print): use const Segment --- src/Window.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Window.zig b/src/Window.zig index 526f6cc..32d9a91 100644 --- a/src/Window.zig +++ b/src/Window.zig @@ -269,7 +269,7 @@ pub const PrintResult = struct { /// prints segments to the window. returns true if the text overflowed with the /// given wrap strategy and size. -pub fn print(self: Window, segments: []Segment, opts: PrintOptions) !PrintResult { +pub fn print(self: Window, segments: []const Segment, opts: PrintOptions) !PrintResult { var row = opts.row_offset; switch (opts.wrap) { .grapheme => { @@ -439,7 +439,7 @@ pub fn print(self: Window, segments: []Segment, opts: PrintOptions) !PrintResult } /// Deprecated. use print instead -pub fn wrap(self: Window, segments: []Segment) !void { +pub fn wrap(self: Window, segments: []const Segment) !void { _ = try self.print(segments, .{ .wrap = .word }); }