From 7b764bb43d9c45e04a8dbb0146b3529991007949 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 4 May 2020 21:04:47 -0700 Subject: terminal: disable 'scrolloff' (fixes flicker) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- test/functional/terminal/buffer_spec.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/functional/terminal') 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([[]]) + 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(':set bufhidden=wipe:enew') -- cgit