blob: 63ca21dbb1fe20fb04e3388041b72899dc5bba73 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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 25 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 11
release left 18 11
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
|