From a3509f32a9d6a3e6cb9557107f61acf96d2d73d3 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 13 Mar 2024 12:48:24 -0700 Subject: [PATCH] terminal: selection should use pin iterators --- src/terminal/Selection.zig | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/terminal/Selection.zig b/src/terminal/Selection.zig index 7343ddd76..277045981 100644 --- a/src/terminal/Selection.zig +++ b/src/terminal/Selection.zig @@ -382,11 +382,7 @@ pub fn adjust( }, .left => { - var it = s.pages.cellIterator( - .left_up, - .{ .screen = .{} }, - s.pages.pointFromPin(.screen, end_pin.*).?, - ); + var it = end_pin.cellIterator(.left_up, null); _ = it.next(); while (it.next()) |next| { const rac = next.rowAndCell(); @@ -400,11 +396,7 @@ pub fn adjust( .right => { // Step right, wrapping to the next row down at the start of each new line, // until we find a non-empty cell. - var it = s.pages.cellIterator( - .right_down, - s.pages.pointFromPin(.screen, end_pin.*).?, - null, - ); + var it = end_pin.cellIterator(.right_down, null); _ = it.next(); while (it.next()) |next| { const rac = next.rowAndCell();