diff options
Diffstat (limited to 'test/functional/ui/popupmenu_spec.lua')
-rw-r--r-- | test/functional/ui/popupmenu_spec.lua | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua index 466e078277..ffa803e7e1 100644 --- a/test/functional/ui/popupmenu_spec.lua +++ b/test/functional/ui/popupmenu_spec.lua @@ -6,6 +6,7 @@ local insert = helpers.insert local meths = helpers.meths local command = helpers.command local funcs = helpers.funcs +local get_pathsep = helpers.get_pathsep describe('ui/ext_popupmenu', function() local screen @@ -1503,6 +1504,53 @@ describe('builtin popupmenu', function() {3:lå}{n: långfile2 }{3: }| :b långfile1^ | ]]) + + -- position is calculated correctly with "longest" + feed('<esc>') + command('set wildmode=longest:full,full') + feed(':b lå<tab>') + screen:expect([[ + | + {1:~ }| + {4:långfile2 }| + | + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }{n: långfile1 }{1: }| + {3:lå}{n: långfile2 }{3: }| + :b långfile^ | + ]]) + + -- special case: when patterns ends with "/", show menu items aligned + -- after the "/" + feed('<esc>') + command("close") + command('set wildmode=full') + command("cd test/functional/fixtures/") + feed(':e compdir/<tab>') + screen:expect([[ + | + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }{s: file1 }{1: }| + {1:~ }{n: file2 }{1: }| + :e compdir]]..get_pathsep()..[[file1^ | + ]]) end) it("'pumblend' RGB-color", function() |