From f848ed2a635991552dad5cdf48136aa251220ad9 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 21 Mar 2024 21:52:14 -0700 Subject: [PATCH] terminal: handle row wrap integrity issues on reflow --- src/terminal/PageList.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/terminal/PageList.zig b/src/terminal/PageList.zig index 0531fda58..b3e07ac0c 100644 --- a/src/terminal/PageList.zig +++ b/src/terminal/PageList.zig @@ -1162,9 +1162,9 @@ fn reflowPage( // If we're still in a wrapped line at the end of our page, // we traverse forward and continue reflowing until we complete // this entire line. - if (src_cursor.page_row.wrap) { + if (src_cursor.page_row.wrap) wrap: { src_completing_wrap = true; - src_node = src_node.next.?; + src_node = src_node.next orelse break :wrap; src_cursor = ReflowCursor.init(&src_node.data); continue :src_loop; }