aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/api/window_spec.lua15
-rw-r--r--test/functional/ui/cmdline_spec.lua23
2 files changed, 38 insertions, 0 deletions
diff --git a/test/functional/api/window_spec.lua b/test/functional/api/window_spec.lua
index a10c8f48ef..721148faaa 100644
--- a/test/functional/api/window_spec.lua
+++ b/test/functional/api/window_spec.lua
@@ -219,6 +219,21 @@ describe('API/win', function()
-- curwin didn't change back
neq(win, curwin())
+
+ -- shows updated position after getchar() #20793
+ feed(':call getchar()<CR>')
+ api.nvim_win_set_cursor(win, { 1, 5 })
+ screen:expect {
+ grid = [[
+ |
+ {1:~ }|*2
+ {2:[No Name] }|
+ prolo^gue |
+ |*2
+ {3:[No Name] [+] }|
+ :call getchar() |
+ ]],
+ }
end)
it('remembers what column it wants to be in', function()
diff --git a/test/functional/ui/cmdline_spec.lua b/test/functional/ui/cmdline_spec.lua
index 0eb5770819..3b5b488982 100644
--- a/test/functional/ui/cmdline_spec.lua
+++ b/test/functional/ui/cmdline_spec.lua
@@ -824,6 +824,29 @@ local function test_cmdline(linegrid)
|
]])
end)
+
+ it('does not move cursor to curwin #20309', function()
+ local win = api.nvim_get_current_win()
+ command('norm icmdlinewin')
+ command('new')
+ command('norm icurwin')
+ feed(':')
+ api.nvim_win_set_cursor(win, { 1, 7 })
+ screen:expect {
+ grid = [[
+ curwin |
+ {3:[No Name] [+] }|
+ cmdline^win |
+ {2:[No Name] [+] }|
+ |
+ ]],
+ cmdline = { {
+ content = { { '' } },
+ firstc = ':',
+ pos = 0,
+ } },
+ }
+ end)
end
-- the representation of cmdline and cmdline_block contents changed with ext_linegrid