diff options
| author | Gabriel Schneider <[email protected]> | 2026-08-09 06:54:27 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-10 09:17:07 -0300 |
| commit | 599dd82f96b9d091aae78300aa6c3fbc81f9eb69 (patch) | |
| tree | 532d29eb0d79896cd730fb324df4866056306506 /test/snapshots/lspcompletemoved.snap | |
| parent | 628aa40f13e9bbd313b51ab625f193110aad8dd0 (diff) | |
| download | pardes-599dd82f96b9d091aae78300aa6c3fbc81f9eb69.tar.gz pardes-599dd82f96b9d091aae78300aa6c3fbc81f9eb69.zip | |
review pass: fix the eaten Tab, drop the duplicated code, cover the gaps
Diffstat (limited to 'test/snapshots/lspcompletemoved.snap')
| -rw-r--r-- | test/snapshots/lspcompletemoved.snap | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/snapshots/lspcompletemoved.snap b/test/snapshots/lspcompletemoved.snap new file mode 100644 index 00000000..5f20b806 --- /dev/null +++ b/test/snapshots/lspcompletemoved.snap @@ -0,0 +1,33 @@ +# The guard that makes "an empty answer indents" safe to have at all. +# +# lspcomplete.snap pins the indent itself: Tab after a dot the backend cannot +# answer diverts, the answer comes back empty, and four spaces go in LATE so +# the keystroke is not eaten. That late write is the dangerous half — it lands +# a few hundred milliseconds after the key, by which time the hands have moved +# on — so lspResponse only performs it if nothing has: same pane, still insert, +# one cursor, cursor still on the cell the Tab was pressed at. Nothing covered +# the condition, only its happy side. +# +# Same file and same click as lspcomplete's `commentindent` arm — line 12 is a +# comment, so no candidate can exist and the answer is certainly empty — but +# here an `x` is typed straight after the Tab, in the same write, long before a +# ZLS analysis can finish. The buffer below is the assertion: `// note.x`, with +# neither `// note. x` (the indent landing under the typing) nor +# `// note.x ` (the indent landing on top of it). +file a.zig const Shade = enum {\n verdigris,\n cinnabar,\n};\n\nfn pick(s: Shade) u8 {\n return switch (s) {\n \n };\n}\n\n// note. see below\n +start 20 120 a.zig +wait 8000 verdigris +stable 700 20000 +press left 16 14 +release left 16 14 +stable 400 5000 +key i +key tab +text x +stable 700 20000 +snap typedthrough +key esc +settle 100 +key space f s +stable 700 15000 +snapfile buffer /tmp/pardes-snap/lspcompletemoved/cwd/a.zig |
