aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/ex_terminal_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-02-21 15:06:44 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-02-26 13:00:01 +0100
commit4ceec30cd0b48f865ffae05811c4862cef4a548a (patch)
treedf0b5272e1560bdd4af78c0697c68a58303242d7 /test/functional/terminal/ex_terminal_spec.lua
parente7bbd35c812d338918d1c23692c70b403205fb30 (diff)
downloadrneovim-4ceec30cd0b48f865ffae05811c4862cef4a548a.tar.gz
rneovim-4ceec30cd0b48f865ffae05811c4862cef4a548a.tar.bz2
rneovim-4ceec30cd0b48f865ffae05811c4862cef4a548a.zip
terminal: Follow output only if cursor is at end.
Closes #2257 Closes #2636 References #2683
Diffstat (limited to 'test/functional/terminal/ex_terminal_spec.lua')
-rw-r--r--test/functional/terminal/ex_terminal_spec.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/terminal/ex_terminal_spec.lua b/test/functional/terminal/ex_terminal_spec.lua
index dc2535bade..7a9d2a9b36 100644
--- a/test/functional/terminal/ex_terminal_spec.lua
+++ b/test/functional/terminal/ex_terminal_spec.lua
@@ -36,6 +36,18 @@ describe(':terminal', function()
]])
end)
+ it("in normal-mode :split does not move cursor", function()
+ execute([[terminal while true; do echo foo; sleep .1; done]])
+ helpers.feed([[<C-\><C-N>M]]) -- move cursor away from last line
+ wait()
+ eq(3, eval("line('$')")) -- window height
+ eq(2, eval("line('.')")) -- cursor is in the middle
+ execute('vsplit')
+ eq(2, eval("line('.')")) -- cursor stays where we put it
+ execute('split')
+ eq(2, eval("line('.')")) -- cursor stays where we put it
+ end)
+
end)
describe(':terminal (with fake shell)', function()