feat(defaults): set hidden

This commit is contained in:
Gregory Anders 2021-08-17 12:12:09 -06:00
parent 15b736d6e8
commit f6c72b745c
4 changed files with 4 additions and 2 deletions

View File

@ -3078,7 +3078,7 @@ A jump table for the options with a short description can be found at |Q_op|.
See |help-translated|. See |help-translated|.
*'hidden'* *'hid'* *'nohidden'* *'nohid'* *'hidden'* *'hid'* *'nohidden'* *'nohid'*
'hidden' 'hid' boolean (default off) 'hidden' 'hid' boolean (default on)
global global
When off a buffer is unloaded when it is |abandon|ed. When on a When off a buffer is unloaded when it is |abandon|ed. When on a
buffer becomes hidden when it is |abandon|ed. If the buffer is still buffer becomes hidden when it is |abandon|ed. If the buffer is still

View File

@ -41,6 +41,7 @@ the differences.
- 'fillchars' defaults (in effect) to "vert:│,fold:·,sep:│" - 'fillchars' defaults (in effect) to "vert:│,fold:·,sep:│"
- 'formatoptions' defaults to "tcqj" - 'formatoptions' defaults to "tcqj"
- 'fsync' is disabled - 'fsync' is disabled
- 'hidden' is enabled
- 'history' defaults to 10000 (the maximum) - 'history' defaults to 10000 (the maximum)
- 'hlsearch' is enabled - 'hlsearch' is enabled
- 'incsearch' is enabled - 'incsearch' is enabled

View File

@ -1081,7 +1081,7 @@ return {
short_desc=N_("don't unload buffer when it is |abandon|ed"), short_desc=N_("don't unload buffer when it is |abandon|ed"),
type='bool', scope={'global'}, type='bool', scope={'global'},
varname='p_hid', varname='p_hid',
defaults={if_true=false} defaults={if_true=true}
}, },
{ {
full_name='highlight', abbreviation='hl', full_name='highlight', abbreviation='hl',

View File

@ -55,6 +55,7 @@ describe(":drop", function()
end) end)
it("splits off a new window when a buffer can't be abandoned", function() it("splits off a new window when a buffer can't be abandoned", function()
command("set nohidden")
feed_command("edit tmp1") feed_command("edit tmp1")
feed_command("vsplit") feed_command("vsplit")
feed_command("edit tmp2") feed_command("edit tmp2")