From 17052946c744abd53d8f3349f453964ffa818bea Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 20 Apr 2017 12:32:14 +0200 Subject: 'scrollback': Allow :setlocal -1 on normal buffers Avoids a spurious :loadview error. --- test/functional/terminal/scrollback_spec.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/functional') diff --git a/test/functional/terminal/scrollback_spec.lua b/test/functional/terminal/scrollback_spec.lua index 32f25d4086..05f81295c2 100644 --- a/test/functional/terminal/scrollback_spec.lua +++ b/test/functional/terminal/scrollback_spec.lua @@ -451,6 +451,13 @@ describe("'scrollback' option", function() it(':setlocal in a normal buffer is an error', function() command('new') + + -- :setlocal to -1 is NOT an error. + feed_command('setlocal scrollback=-1') + eq(nil, string.match(eval("v:errmsg"), "E%d*:")) + feed('') + + -- :setlocal to anything except -1 is an error. feed_command('setlocal scrollback=42') feed('') eq('E474:', string.match(eval("v:errmsg"), "E%d*:")) -- cgit