diff --git a/Customization.md b/Customization.md index 695bbb7..6d07188 100644 --- a/Customization.md +++ b/Customization.md @@ -76,12 +76,13 @@ Suggested by [mm2703](https://github.com/mm2703) and [axelGschaider](https://git ```vim function! g:goyo_before() - " ... + let b:quitting = 0 + autocmd QuitPre let b:quitting = 1 endfunction function! g:goyo_after() " Quit Vim if this is the only remaining buffer - if len(filter(range(1, bufnr('$')), 'buflisted(v:val)')) == 1 + if b:quitting && len(filter(range(1, bufnr('$')), 'buflisted(v:val)')) == 1 qa endif endfunction