From: Hiroshi Shirosaki Date: Fri, 15 Jan 2016 09:04:49 +0000 (+0900) Subject: Use vertical resize command X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/803edeaee97bea3690fdb5db76cd58b8d4f7cc03 Use vertical resize command We can resize window without changing winwidth option. --- diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim index ae81c80..752aee4 100644 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@ -347,9 +347,9 @@ function! s:Toc(...) vertical lopen " auto-fit toc window when possible to shrink it if (&columns/2) > l:header_max_len && g:vim_markdown_toc_autofit == 1 - let &winwidth = (l:header_max_len + 1) + execute 'vertical resize ' . (l:header_max_len + 1) else - let &winwidth = (&columns/2) + execute 'vertical resize ' . (&columns/2) endif elseif l:window_type ==# 'tab' tab lopen