# 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 # 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. # # A row in the SAME directory shortens to a bare basename; the two that a # prefix strip can actually 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`. # 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 # resolves to nothing. # # `n` and the Enter after it are the assertion in both, not the row text: the # step selects row 1, the look opens the right file with the member SELECTED # on its own line, and focus follows what opened — so the snap header's cursor # is that pane's, and the style capture is where the selection itself shows. dirmk sub dirmk sub/inner 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 ---- start 35 100 sub/parent.zig wait 8000 fn pick stable 700 20000 press left 31 6 release left 31 6 stable 400 5000 key g key r # the query pane under parent.zig, line 1 `Refs`, the rows under each file: # shade.zig's spelled whole, its directory being above wait 15000 cwd/shade.zig stable 700 15000 snap absrow # the current row is parent.zig's own; the one before it is shade.zig's, # shown in the +Preview, which Enter makes shade.zig's pane key c-p wait 10000 verdigris stable 700 15000 key enter stable 700 15000 snap abslook snapstyle abslook start 35 100 sub/subdir.zig wait 8000 fn hue stable 700 20000 press left 29 6 release left 29 6 stable 400 5000 key g key r wait 15000 inner/tint.zig stable 700 15000 snap subrow key c-p wait 10000 ochre stable 700 15000 key enter stable 700 15000 snap sublook snapstyle sublook press right 12 13 release right 12 13 stable 700 15000 snap clicked