summaryrefslogtreecommitdiff
path: root/test/snapshots/lsp-rename.snap
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-10 09:14:05 -0300
committerGabriel Schneider <[email protected]>2026-08-10 09:17:07 -0300
commit38e9919a9ea9055538409b388d580c4e4c838434 (patch)
treea51ad778189cf007857f0d207f804d59228a023e /test/snapshots/lsp-rename.snap
parent0d66575a3c888498c7929e2ec345133628c5d63d (diff)
downloadpardes-38e9919a9ea9055538409b388d580c4e4c838434.tar.gz
pardes-38e9919a9ea9055538409b388d580c4e4c838434.zip
fixed lsp rename
Diffstat (limited to 'test/snapshots/lsp-rename.snap')
-rw-r--r--test/snapshots/lsp-rename.snap27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/snapshots/lsp-rename.snap b/test/snapshots/lsp-rename.snap
new file mode 100644
index 00000000..c29b001e
--- /dev/null
+++ b/test/snapshots/lsp-rename.snap
@@ -0,0 +1,27 @@
+# Rename end to end: the leader prompt, async ZLS resolution, atomic file edit,
+# shadow filtering, and one-step undo/redo. The source has a same-spelled local
+# which must not be changed when the top-level helper is renamed.
+file rename.zig const std = @import("std");\n\nfn helper(x: u32) u32 {\n return x + 1;\n}\n\npub fn main() void {\n _ = helper(41);\n}\n\nfn shadowed() void {\n const helper: u32 = 7;\n _ = helper;\n}\n
+start 24 110 rename.zig
+wait 8000 helper(41)
+stable 700 20000
+# Put the cursor inside the top-level call, then use the helix rename binding.
+press left 18 10
+release left 18 10
+key space
+key l
+key r
+stable 400 5000
+text renamed_helper
+key enter
+wait 10000 renamed_helper(41)
+stable 700 15000
+snap renamed
+# Both resolved top-level occurrences changed; the shadowed local stayed helper.
+# The whole asynchronous rename is one history transaction.
+key u
+stable 400 5000
+snap undone
+key U
+stable 400 5000
+snap redone