summaryrefslogtreecommitdiff
path: root/test/snapshots/lsprelpath.snap
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-30 17:35:06 -0300
committerGabriel Schneider <[email protected]>2026-10-30 17:35:06 -0300
commit6d8da8721141284cf33bb901168b26135893eb86 (patch)
tree791d63401d4e85fbca1d597a8ce0326e70efd545 /test/snapshots/lsprelpath.snap
parentefd43a3a2cf03bb741366331158b368abf9ac583 (diff)
parentbf6810a8f9d6cc82050e7d9c0cfb06358301b574 (diff)
downloadpardes-6d8da8721141284cf33bb901168b26135893eb86.tar.gz
pardes-6d8da8721141284cf33bb901168b26135893eb86.zip
Merge latest upstream into the macOS branch for Zig 0.17
Retain the macOS branch history and local Acme selection color while adopting upstream's current core and platform changes. Pin Zig and ZLS to 0.17.0, and fetch the existing zstbi compatibility commit through upstream after its original fork was removed.
Diffstat (limited to 'test/snapshots/lsprelpath.snap')
-rw-r--r--test/snapshots/lsprelpath.snap81
1 files changed, 34 insertions, 47 deletions
diff --git a/test/snapshots/lsprelpath.snap b/test/snapshots/lsprelpath.snap
index 247390fe..152a13a3 100644
--- a/test/snapshots/lsprelpath.snap
+++ b/test/snapshots/lsprelpath.snap
@@ -1,19 +1,18 @@
# What a language row SPELLS its path as, and that both spellings still LOOK.
#
-# A row is written relative to the directory of the file the query was asked
-# about (lsp.rel, fed from Req.root) when the answer lives UNDER that directory,
-# and keeps its full absolute path when it does not — a `gr` list was otherwise
+# A row spells its path the shortest way a Look from the query pane resolves
+# (Query.lookPath): relative to the pane's directory, `../` included, when that
+# is shorter than the absolute path, else absolute — a `gr` list was otherwise
# the same forty-character prefix repeated down the pane with the part you came
-# to read pushed off the right edge, and a path outside the tree has nothing
-# short to be called.
+# to read pushed off the right edge.
#
-# lspcomplete.snap already covers the easy middle case, a candidate in the SAME
-# directory, which shortens to a bare basename. The two that a prefix strip can
-# actually get wrong are here, one app each:
+# A row in the SAME directory shortens to a bare basename; the two that a
+# careless shortening can get wrong are here, one app each, as `gr` rows
+# (the file headers of the asking text's query pane, line 1 `Refs`):
#
-# PARENT the enum is one level UP from the asking file, so nothing is
-# stripped and the row carries `/tmp/.../cwd/shade.zig`. This is
-# the case that must NOT become `../shade.zig`.
+# PARENT the enum is one level UP from the asking file, so the row
+# climbs: `../shade.zig`, shorter than `/tmp/.../cwd/shade.zig`,
+# and a Look from the pane still lands on it.
# SUBDIRECTORY the enum is one level DOWN, so the strip leaves a path with a
# separator still in it — `inner/tint.zig`, not `tint.zig`. A
# strip that took the basename instead would produce a row that
@@ -29,61 +28,49 @@ file shade.zig pub const Shade = enum {\n verdigris,\n cinnabar,\n};\n
file sub/inner/tint.zig pub const Tint = enum {\n ochre,\n indigo,\n};\n
file sub/parent.zig const shade = @import("../shade.zig");\n\npub fn pick(s: shade.Shade) u8 {\n return switch (s) {\n \n };\n}\n
file sub/subdir.zig const tint = @import("inner/tint.zig");\n\npub fn hue(t: tint.Tint) u8 {\n return switch (t) {\n \n };\n}\n
-# ---- PARENT: outside the asking file's tree, so the row stays absolute ----
+# ---- PARENT: outside the asking file's tree, so the row climbs ----
start 35 100 sub/parent.zig
wait 8000 fn pick
stable 700 20000
-# file line 5 (grid row 6, 1-based click row 7) is the switch's empty body
-press left 8 8
-release left 8 8
+press left 31 6
+release left 31 6
stable 400 5000
-key i
-key end
-text .
-stable 400 5000
-key tab
-wait 15000 cwd/shade.zig:2:
+key g
+key r
+# the query pane under parent.zig, line 1 `Refs`, the rows under each file:
+# shade.zig's spelled from above, `../shade.zig`
+wait 15000 ../shade.zig:1
stable 700 15000
snap absrow
-key esc
-settle 100
-# An absolute row has to keep resolving — it is the spelling every row had
-# before this, and the one every hit outside the tree still has.
-key n
+# the current row is parent.zig's own; the one before it is shade.zig's,
+# shown in the +Preview (N, the list in normal mode), which Enter makes
+# shade.zig's pane
+key N
+wait 10000 verdigris
+stable 700 15000
key enter
stable 700 15000
snap abslook
snapstyle abslook
-# ---- SUBDIRECTORY: under it, so the strip leaves `inner/tint.zig` ----
start 35 100 sub/subdir.zig
wait 8000 fn hue
stable 700 20000
-press left 8 8
-release left 8 8
+press left 29 6
+release left 29 6
stable 400 5000
-key i
-key end
-text .
-stable 400 5000
-key tab
-wait 15000 inner/tint.zig:2:
+key g
+key r
+wait 15000 inner/tint.zig
stable 700 15000
snap subrow
-key esc
-settle 100
-key n
+key N
+wait 10000 ochre
+stable 700 15000
key enter
stable 700 15000
snap sublook
snapstyle sublook
-# The mouse spelling, on the OTHER row (grid row 33, 1-based click row 34). A
-# right click expands to the file-ish word under the cursor
-# (config.wordBounds), which has to take `inner/tint.zig:3:5-10` WHOLE — the
-# separator inside a stripped path is a file char, so the scan runs back over
-# `inner/` and stops on the space of the line-number prefix. A look focuses
-# what it opens, so the header's cursor is the assertion: the end of `indigo`
-# on line 3 of tint.zig.
-press right 12 35
-release right 12 35
+press right 12 13
+release right 12 13
stable 700 15000
snap clicked