From: luzhlon Date: Sun, 11 Dec 2016 01:26:15 +0000 (+0800) Subject: fixed the autofit bug X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/bf9cf6524bf5534430ca7145eeada968c9e96e03?ds=sidebyside;hp=-c fixed the autofit bug --- bf9cf6524bf5534430ca7145eeada968c9e96e03 diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim index daaa2af..bf28d5e 100644 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@ -351,7 +351,7 @@ function! s:Toc(...) endif endif " keep track of the longest header size (heading level + title) - let l:total_len = stridx(l:line, ' ') + len(l:line) + let l:total_len = stridx(l:line, ' ') + strdisplaywidth(l:line) if l:total_len > l:header_max_len let l:header_max_len = l:total_len endif