Skip to content

Commit

Permalink
Merge pull request Shougo#851 from justinmk/bufhidden
Browse files Browse the repository at this point in the history
Fix Shougo#703: ignore -no-split if bufhidden={unload,delete,wipe}
  • Loading branch information
Shougo committed Feb 19, 2015
2 parents 89a685c + e150303 commit e88b81f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion autoload/unite/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ function! unite#init#_context(context, ...) "{{{
let context.horizontal = 1
let context.direction = 'belowright'
endif
if &l:modified && !&l:hidden
if (!&l:hidden && &l:modified)
\ || (&l:hidden && &l:bufhidden =~# 'unload\|delete\|wipe')
" Split automatically.
let context.split = 1
endif
Expand Down
4 changes: 3 additions & 1 deletion doc/unite.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1659,7 +1659,9 @@ the context dictionary.

*unite-options-no-split*
-no-split
Open the unite buffer in the current window.
Open the unite buffer in the current window instead of a new
window. This is ignored if the current buffer has set
'bufhidden' to unload/delete/wipe.
Default: split

*unite-options-no-cursor-line*
Expand Down

0 comments on commit e88b81f

Please sign in to comment.