aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/popupmenu_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/ui/popupmenu_spec.lua')
-rw-r--r--test/functional/ui/popupmenu_spec.lua46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua
index 0a28ea2d0a..fe093b67d5 100644
--- a/test/functional/ui/popupmenu_spec.lua
+++ b/test/functional/ui/popupmenu_spec.lua
@@ -6042,6 +6042,52 @@ describe('builtin popupmenu', function()
{2:-- }{5:match 1 of 3} |
]])
feed('<C-E><ESC>')
+
+ command('setlocal autoindent shiftwidth=2 tabstop=2')
+ feed('Slocal a = <C-X><C-O>')
+ screen:expect([[
+ local a = {8:func ()} |
+ {8: } |
+ {8:end}^ |
+ {1:~ }{s: function () }{1: }|
+ {1:~ }{n: foobar }{1: }|
+ {1:~ }{n: 你好^@ ^@我好 }{1: }|
+ {1:~ }|*13
+ {2:-- }{5:match 1 of 3} |
+ ]])
+
+ feed('<C-Y>')
+ screen:expect([[
+ local a = {8:func ()} |
+ {8: } |
+ end^ |
+ {1:~ }|*16
+ {2:-- INSERT --} |
+ ]])
+
+ feed('<ESC>kAlocal b = <C-X><C-O>')
+ screen:expect([[
+ local a = {8:func ()} |
+ local b = {8:func ()} |
+ {8: } |
+ {8: end}^ |
+ end {s: function () } |
+ {1:~ }{n: foobar }{1: }|
+ {1:~ }{n: 你好^@ ^@我好 }{1: }|
+ {1:~ }|*12
+ {2:-- }{5:match 1 of 3} |
+ ]])
+
+ feed('<C-Y>')
+ screen:expect([[
+ local a = {8:func ()} |
+ local b = {8:func ()} |
+ {8: } |
+ end^ |
+ end |
+ {1:~ }|*14
+ {2:-- INSERT --} |
+ ]])
end)
end
end