From a31482db4dcaa479b09e2683037fee3d6ee56408 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 5 Aug 2017 03:34:38 +0200 Subject: terminal: block redraw during c_CTRL-D Unlike the normal wildmenu, the CTRL-D wild-list is not restored by statusline redraw. (Semantics: ^D is controlled by 'wildoptions' option, so it's in the "wild..." family.) TODO: externalize the c_CTRL-D wild-list. --- test/functional/ui/wildmode_spec.lua | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'test/functional/ui/wildmode_spec.lua') diff --git a/test/functional/ui/wildmode_spec.lua b/test/functional/ui/wildmode_spec.lua index 154f508924..42c92c4c2c 100644 --- a/test/functional/ui/wildmode_spec.lua +++ b/test/functional/ui/wildmode_spec.lua @@ -66,10 +66,10 @@ describe("'wildmenu'", function() else feed([[:terminal for i in $(seq 1 5000); do printf 'foo\nfoo\nfoo\n'; sleep 0.1; done]]) end - screen:sleep(50) -- Allow some output. + feed([[gg]]) feed([[:sign ]]) -- Invoke wildmenu. - screen:sleep(50) -- Allow some output. + screen:sleep(50) -- Allow some terminal output. screen:expect([[ foo | foo | @@ -77,6 +77,28 @@ describe("'wildmenu'", function() define jump list > | :sign define^ | ]]) + + -- cmdline CTRL-D display should also be preserved. + feed([[]]) + feed([[:sign ]]) -- Invoke cmdline CTRL-D. + screen:sleep(50) -- Allow some terminal output. + screen:expect([[ + :sign | + define place | + jump undefine | + list unplace | + :sign ^ | + ]]) + + -- Exiting cmdline should show the buffer. + feed([[]]) + screen:expect([[ + ^foo | + foo | + foo | + foo | + | + ]]) end) it('ignores :redrawstatus called from a timer #7108', function() -- cgit