From bf9cf6524bf5534430ca7145eeada968c9e96e03 Mon Sep 17 00:00:00 2001 From: luzhlon Date: Sun, 11 Dec 2016 09:26:15 +0800 Subject: [PATCH 1/1] fixed the autofit bug --- ftplugin/markdown.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5