summaryrefslogtreecommitdiff
path: root/core/body_layer.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/body_layer.zig')
-rw-r--r--core/body_layer.zig11
1 files changed, 6 insertions, 5 deletions
diff --git a/core/body_layer.zig b/core/body_layer.zig
index f00da4a9..5e23a415 100644
--- a/core/body_layer.zig
+++ b/core/body_layer.zig
@@ -575,10 +575,11 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
/// A message at the lines it names, drawn and never written (SPEC ยง10.2,
/// ruling R3): after the end of each such line shown, the message's glyph
-/// and its words there; under the caret's line, when the keyboard is in
-/// this body, the lines that explain it where the step put them
-/// (Pane.ghost_at, ghost_rows: Messages.detailUnder), pushing the rows
-/// below down (the rows past the body's foot are not shown meanwhile).
+/// and its words there, unless the file changed since (Place.stale);
+/// under the caret's line, when the keyboard is in this body, the lines
+/// that explain it where the step put them (Pane.ghost_at, ghost_rows:
+/// Messages.detailUnder), pushing the rows below down (the rows past the
+/// body's foot are not shown meanwhile).
/// Bounded by the rows shown and the live messages' places
/// (Messages.max_live, Said.max_places).
fn messageGhosts(p: *Pardes, s: *Surface, pane: *Pane, tx: u16, tw: u16, body_y: u16, body_h: u16) void {
@@ -591,7 +592,7 @@ fn messageGhosts(p: *Pardes, s: *Surface, pane: *Pane, tx: u16, tw: u16, body_y:
var hits: [Messages.max_live * Messages.Said.max_places]Hit = undefined;
var n: usize = 0;
for (p.messages.live[0..p.messages.live_len]) |*said| for (said.places[0..said.places_len]) |*place| {
- if (place.line == 0 or !std.mem.eql(u8, place.path.slice(), f.path)) continue;
+ if (place.line == 0 or place.stale or !std.mem.eql(u8, place.path.slice(), f.path)) continue;
hits[n] = .{ .line = place.line - 1, .said = said, .place = place };
n += 1;
};