terminal: global 'scrollback' #6352

Make the 'scrollback' option work like most other buffer-local options:
- `:set scrollback=x` sets the global and local value
- `:setglobal scrollback=x` sets only the global default
- new terminal buffers inherit the global

Normal buffers are still always -1, and :setlocal there is an error.

Closes #6337
This commit is contained in:
Jakob Schnitzer
2017-03-24 20:21:05 +01:00
committed by Justin M. Keyes
parent 2b1398c31e
commit 7bc37ffb22
7 changed files with 53 additions and 39 deletions

View File

@@ -1255,7 +1255,7 @@ typedef enum {
kCdScopeInvalid = -1,
kCdScopeWindow, ///< Affects one window.
kCdScopeTab, ///< Affects one tab page.
kCdScopeGlobal, ///< Affects the entire instance of Neovim.
kCdScopeGlobal, ///< Affects the entire Nvim instance.
} CdScope;
#define MIN_CD_SCOPE kCdScopeWindow