Skip to content

Commit

Permalink
window(print): use const Segment
Browse files Browse the repository at this point in the history
  • Loading branch information
rockorager committed May 3, 2024
1 parent 6abfd8f commit fa7d94f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Window.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down Expand Up @@ -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 });
}

Expand Down

0 comments on commit fa7d94f

Please sign in to comment.