mirror of
https://github.com/junegunn/goyo.vim.git
synced 2025-11-11 04:43:51 -05:00
Resize windows after TermClose on Neovim
Based on the patch submitted by @romanoaugusto88 (#108). Close #97.
This commit is contained in:
@@ -161,6 +161,8 @@ function! s:maps_resize()
|
|||||||
return mapped
|
return mapped
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
nnoremap <silent> <plug>(goyo-resize) :<c-u>call <sid>resize_pads()<cr>
|
||||||
|
|
||||||
function! s:goyo_on(dim)
|
function! s:goyo_on(dim)
|
||||||
let dim = s:parse_arg(a:dim)
|
let dim = s:parse_arg(a:dim)
|
||||||
if empty(dim)
|
if empty(dim)
|
||||||
@@ -263,6 +265,9 @@ function! s:goyo_on(dim)
|
|||||||
autocmd ColorScheme * call s:tranquilize()
|
autocmd ColorScheme * call s:tranquilize()
|
||||||
autocmd BufWinEnter * call s:hide_linenr() | call s:hide_statusline()
|
autocmd BufWinEnter * call s:hide_linenr() | call s:hide_statusline()
|
||||||
autocmd WinEnter,WinLeave * call s:hide_statusline()
|
autocmd WinEnter,WinLeave * call s:hide_statusline()
|
||||||
|
if has('nvim')
|
||||||
|
autocmd TermClose * call feedkeys("\<plug>(goyo-resize)")
|
||||||
|
endif
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
call s:hide_statusline()
|
call s:hide_statusline()
|
||||||
|
|||||||
Reference in New Issue
Block a user