···280280 var cursor: Style = .{};
281281 var link: Hyperlink = .{};
282282283283- // delete remove images from the screen by looping through the
284284- // current state and comparing to the next state
283283+ // remove images from the screen by looping through the last state
284284+ // and comparing to the next state
285285 for (self.screen_last.images.items) |last_img| {
286286 const keep: bool = for (self.screen.images.items) |next_img| {
287287- if (std.meta.eql(last_img, next_img)) break true;
287287+ if (last_img.eql(next_img)) break true;
288288 } else false;
289289 if (keep) continue;
290290+ // TODO: remove image placements
291291+ }
292292+293293+ // add new images. Could slightly optimize by knowing which images
294294+ // we need to keep from the remove loop
295295+ for (self.screen.images.items) |img| {
296296+ const transmit: bool = for (self.screen_last.images.items) |last_img| {
297297+ if (last_img.eql(img)) break false;
298298+ } else true;
299299+ if (!transmit) continue;
300300+ // TODO: transmit the new image to the screen
290301 }
291302292303 var i: usize = 0;