summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-15 16:10:48 -0300
committerGabriel Schneider <[email protected]>2026-09-15 17:24:42 -0300
commitc6ab9db0fdbcb8d16f666749194bb111218b96a8 (patch)
tree0cca62d2076ff4ed5a03c79c5edd1cb06a12ceb8 /src
parentb292808d75078c6b121e4873b150574308bcdc6f (diff)
downloadpardes-c6ab9db0fdbcb8d16f666749194bb111218b96a8.tar.gz
pardes-c6ab9db0fdbcb8d16f666749194bb111218b96a8.zip
Ignore slash-only comment markers in general Look detection
Diffstat (limited to 'src')
-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;