diff --git a/autoload/airline/extensions/tabline/buffers.vim b/autoload/airline/extensions/tabline/buffers.vim index 35b9e98f..88ebe5c8 100644 --- a/autoload/airline/extensions/tabline/buffers.vim +++ b/autoload/airline/extensions/tabline/buffers.vim @@ -207,7 +207,7 @@ function! airline#extensions#tabline#buffers#clickbuf(minwid, clicks, button, mo elseif a:button is# 'm' " middle button - delete buffer - if get(g:, 'airline#extensions#tabline#middle_click_preserves_windows', 0) == 0 + if get(g:, 'airline#extensions#tabline#middle_click_preserves_windows', 0) == 0 || winnr('$') == 1 " just simply delete the clicked buffer. This will cause windows " associated with the clicked buffer to be closed. silent execute 'bdelete' a:minwid diff --git a/doc/airline.txt b/doc/airline.txt index 8fa558ff..5ef18d32 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -963,7 +963,8 @@ Note: Enabling this extension will modify 'showtabline' and 'guioptions'. won't update airline on |:badd| commands) > let airline#extensions#tabline#disable_refresh = 0 -* preserve windows when closing a buffer from the bufferline (default: 0) > +* preserve windows when closing a buffer from the bufferline (neovim specific, + only works with buffers and not real tabs, default: 0) > let airline#extensions#tabline#middle_click_preserves_windows = 1 < ------------------------------------- *airline-taboo*