From c6ab9db0fdbcb8d16f666749194bb111218b96a8 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 15 Sep 2026 16:10:48 -0300 Subject: Ignore slash-only comment markers in general Look detection --- src/look.zig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/look.zig b/src/look.zig index daea5221..5ebb199a 100644 --- a/src/look.zig +++ b/src/look.zig @@ -327,6 +327,9 @@ pub fn resolve(p: ?*pardes.Pardes, word_raw: []const u8, cwd: []const u8, realbu const pl = parsePathLine(trimmed); const word = pl.path; if (word.len == 0) return .none; + // POSIX resolves repeated slashes to the root directory, but bare // and + // /// in text are comment markers. A single / remains a valid target. + if (word.len > 1 and std.mem.indexOfNone(u8, word, "/") == null) return .none; if (word.len > config.pane_addr.len and std.mem.startsWith(u8, word, config.pane_addr)) { var id: usize = 0; -- cgit v1.3