Skip to content

Commit

Permalink
Fix Shougo#664 noname buffer problem in tabopen action
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Jul 29, 2014
1 parent e4761bc commit d255963
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions autoload/unite/kinds/openable.vim
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,14 @@ let s:kind.action_table.tabopen = {
\ }
function! s:kind.action_table.tabopen.func(candidates) "{{{
for candidate in a:candidates
tabnew
call unite#take_action('open', candidate)
let hidden_save = &hidden
try
set nohidden
tabnew
call unite#take_action('open', candidate)
finally
let &hidden = hidden_save
endtry
endfor
endfunction"}}}

Expand Down Expand Up @@ -220,8 +226,15 @@ let s:kind.action_table.tabsplit = {
\ 'is_tab' : 1,
\ }
function! s:kind.action_table.tabsplit.func(candidates) "{{{
tabnew
silent call unite#take_action('open', a:candidates[0])
let hidden_save = &hidden
try
set nohidden
tabnew
silent call unite#take_action('open', a:candidates[0])
finally
let &hidden = hidden_save
endtry

for candidate in a:candidates[1:]
silent call unite#take_action('vsplit', candidate)
endfor
Expand Down

0 comments on commit d255963

Please sign in to comment.