From: Hiroshi Shirosaki Date: Wed, 1 Feb 2017 06:39:43 +0000 (+0900) Subject: Merge pull request #303 from luzhlon/master X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/20aef6091bc1b6d75859b8a629162bac2a819b2f?hp=72e39306ddbc172932a57b3bee503fc5e487fde0 Merge pull request #303 from luzhlon/master fixed the autofit bug --- 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