diff options
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index 135823e4..4147032b 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -6817,6 +6817,28 @@ pub const Pardes = struct { // places it, and the entry is that pane from here on. if (j.serial == 0) { const e = p.recentByHash(j.path_hash) orelse return; + // Deleted since: its entries go, it is said, and the step goes + // on to the next place, never stuck on one that cannot open. + if (!recentKeeps(e.path)) { + var said: [recent_path_cap + 32]u8 = undefined; + p.setMessage(p.active, std.fmt.bufPrint(&said, "{s}: deleted, skipped", .{e.path}) catch "deleted, skipped"); + const hash = j.path_hash; + var w: usize = 0; + var cur = p.jcur; + for (p.jumps[0..p.njumps], 0..) |k, i| { + if (k.serial == 0 and k.path_hash == hash) { + if (i < p.jcur) cur -= 1; + continue; + } + p.jumps[w] = k; + w += 1; + } + p.njumps = w; + p.jcur = @min(cur, w -| 1); + // The same step again, over the list without them: each + // round takes one file's entries away, so it ends. + return p.jumpBy(delta); + } const from = p.active; look.reopenAt(p, from, e.path, .{ .line = @max(1, j.line), .col = @max(1, j.col) }); const opened = p.panes[p.active] orelse return; |
