Skip to content

Commit ff2302f

Browse files
balkitechntools
authored andcommitted
Set correct width for rendering markdown (yegappan#691)
1 parent e00af1d commit ff2302f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ftplugin/lspgfm.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ def RenderGitHubMarkdownText()
5757
endif
5858
# parse the github markdown content and convert it into a list of text and
5959
# list of associated text properties.
60-
document = md.ParseMarkdown(bnr->getbufline(1, '$'), winId->winwidth())
60+
const [ winInfo ] = winId->getwininfo()
61+
document = md.ParseMarkdown(bnr->getbufline(1, '$'), winInfo.width - winInfo.textoff)
6162
catch /.*/
6263
b:markdown_fallback = v:true
6364
return

0 commit comments

Comments
 (0)