diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2020-05-04 21:04:47 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2020-05-04 21:21:33 -0700 |
commit | 7b764bb43d9c45e04a8dbb0146b3529991007949 (patch) | |
tree | ff8df84a5d8f7909b8f6308c4f4280b82fb22ac5 /test/functional/terminal/buffer_spec.lua | |
parent | edd5b233d8d97a21b2cc572f7fe49331e395a55b (diff) | |
download | rneovim-7b764bb43d9c45e04a8dbb0146b3529991007949.tar.gz rneovim-7b764bb43d9c45e04a8dbb0146b3529991007949.tar.bz2 rneovim-7b764bb43d9c45e04a8dbb0146b3529991007949.zip |
terminal: disable 'scrolloff' (fixes flicker)
Besides the special-case in get_scrolloff_value(), it makes sense for
'scrolloff' and 'sidescrolloff' to reflect the correct values (for
plugins, scripts, …).
ref 53d607af9c53accfd634435908fb79061f1212b9
ref #11915
ref #12230
Diffstat (limited to 'test/functional/terminal/buffer_spec.lua')
-rw-r--r-- | test/functional/terminal/buffer_spec.lua | 12 |
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>') |