diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-07-01 19:50:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-01 19:50:17 +0200 |
commit | 6d2b11d76ccaf6fd28002e33b9dd72a9cb80d646 (patch) | |
tree | fa1a20a41526426dca607171a531f24f29edda59 /test/functional/ui/popupmenu_spec.lua | |
parent | 740fb337dd8c63b63db186057fca2994b92ddbf5 (diff) | |
parent | b98d1cf68bd1d78d8170a8d994ba7dae5540962a (diff) | |
download | rneovim-6d2b11d76ccaf6fd28002e33b9dd72a9cb80d646.tar.gz rneovim-6d2b11d76ccaf6fd28002e33b9dd72a9cb80d646.tar.bz2 rneovim-6d2b11d76ccaf6fd28002e33b9dd72a9cb80d646.zip |
Merge pull request #10387 from bfredl/wildpos
cmdline: correct the column position of wildoptions=pum popupmenu
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() |