From 803edeaee97bea3690fdb5db76cd58b8d4f7cc03 Mon Sep 17 00:00:00 2001 From: Hiroshi Shirosaki Date: Fri, 15 Jan 2016 18:04:49 +0900 Subject: [PATCH] Use vertical resize command We can resize window without changing winwidth option. --- ftplugin/markdown.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.2