aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/buffer_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2020-05-05 00:32:23 -0400
committerGitHub <noreply@github.com>2020-05-05 00:32:23 -0400
commitfdd328d568f7f1a11474fd59a429ace2720afa33 (patch)
treeff8df84a5d8f7909b8f6308c4f4280b82fb22ac5 /test/functional/terminal/buffer_spec.lua
parentf605eeec65a3f4923e02f97fcef713365cd2e588 (diff)
parent7b764bb43d9c45e04a8dbb0146b3529991007949 (diff)
downloadrneovim-fdd328d568f7f1a11474fd59a429ace2720afa33.tar.gz
rneovim-fdd328d568f7f1a11474fd59a429ace2720afa33.tar.bz2
rneovim-fdd328d568f7f1a11474fd59a429ace2720afa33.zip
Merge #12230 'fix :terminal flicker with scrolloff'
Diffstat (limited to 'test/functional/terminal/buffer_spec.lua')
-rw-r--r--test/functional/terminal/buffer_spec.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua
index d40baca871..f79aceaddf 100644
--- a/test/functional/terminal/buffer_spec.lua
+++ b/test/functional/terminal/buffer_spec.lua
@@ -17,6 +17,18 @@ describe(':terminal buffer', function()
screen = thelpers.screen_setup()
end)
+ it('terminal-mode forces various options', function()
+ feed([[<C-\><C-N>]])
+ command('setlocal cursorline cursorcolumn scrolloff=4 sidescrolloff=7')
+ eq({ 1, 1, 4, 7 }, eval('[&l:cursorline, &l:cursorcolumn, &l:scrolloff, &l:sidescrolloff]'))
+ eq('n', eval('mode()'))
+
+ -- Enter terminal-mode ("insert" mode in :terminal).
+ feed('i')
+ eq('t', eval('mode()'))
+ eq({ 0, 0, 0, 0 }, eval('[&l:cursorline, &l:cursorcolumn, &l:scrolloff, &l:sidescrolloff]'))
+ end)
+
describe('when a new file is edited', function()
before_each(function()
feed('<c-\\><c-n>:set bufhidden=wipe<cr>:enew<cr>')