mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
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
This commit is contained in:
@@ -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>')
|
||||
|
Reference in New Issue
Block a user