summaryrefslogtreecommitdiff
path: root/src/look.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/look.zig')
-rw-r--r--src/look.zig3
1 files changed, 3 insertions, 0 deletions
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;